Unity物理引擎

SKILLAI 工具
AI 工具 未标注权限 许可证不明确
安装这个技能

Unity物理引擎专用技能,帮助AI Agent高效完成相关任务。

一句话选型结论

按资料字段整理

Unity物理引擎是AI 工具类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类AI 工具 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_3c6cb52e/unity-physics-sh-t9p516
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

AI 工具
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_3c6cb52e仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791736982
正文体量6.4 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
组合多个 AI 能力

把写作、检索、总结串成一条流程。

搭工作流

把固定流程做成可重复调用的步骤。

做提示词与评测

整理提示词并对比输出效果。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在AI 工具场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
Unity物理引擎当前 未标注权限 未标注 未标注 未标注 有
执行计划 只读 GitHub 仓库 151.5 万 Codex、Claude、Cursor 有
Playwright MCP 测试 浏览器控制 ClawHub 市场 136.5 万 OpenClaw 有
完成前的验证 未标注权限 GitHub 仓库 131.9 万 Codex、Claude、Cursor 有
子 Agent 驱动开发 只读 GitHub 仓库 131.2 万 Codex、Claude、Cursor 有
前端设计 执行命令 GitHub 仓库 125.6 万 Codex、Claude、Cursor 有

SKILL.md 全文

6.4 KB
模型实际读到的说明书原文,来自技能仓库

Unity Physics (Rigidbody / PhysX)

Make objects move, collide, and detect each other with Unity 6's built-in 3D physics
(PhysX). Get the FixedUpdate discipline, trigger-vs-collision rules, and collision layers
right. Targets Unity 6 (6000.0 LTS).

> Unity 6 rename: Rigidbody.velocity is now Rigidbody.linearVelocity (the old
> name is deprecated). Code copied from older tutorials will warn or fail to compile.

When to use

  • Use when giving an object physical motion (forces, velocity, gravity), responding to
    collisions or triggers, setting up collision layers/masks, raycasting for ground checks or
    line-of-sight, or connecting bodies with joints.
  • Use when scenes/prefabs contain Rigidbody + Collider components.

When not to use: 2D physics (Rigidbody2D, Collider2D) is a separate API — adapt the
concepts but the types differ. Cross-engine feel tuning (timestep, jitter, tunnelling) →
physics-tuning. Reading input that drives movement → unity-input-system.

Core workflow

  1. Add a Rigidbody to anything that should be simulated; add a Collider to anything
    that should be hit. A collision needs a Collider on both, and at least one Rigidbody.
  2. Do all physics in FixedUpdate. Read input in Update, store intent, then apply
    forces / set linearVelocity / call MovePosition in FixedUpdate.
  3. Move bodies through the physics API, not the Transform. Use AddForce,
    linearVelocity, or MovePosition — never assign transform.position to a non-kinematic
    Rigidbody (it teleports and breaks collision resolution).
  4. Pick collision vs trigger. A solid collision blocks and calls OnCollisionEnter; a
    Collider with Is Trigger checked passes through and calls OnTriggerEnter.
  5. Organise interactions with layers. Put objects on layers and edit the Layer Collision
    Matrix (Project Settings → Physics) so unrelated things don't test against each other.
  6. Verify with the Physics Debugger (Window → Analysis → Physics Debugger) and by watching
    for jitter; if fast objects pass through walls, raise Collision Detection mode.

Patterns

1. Force-based movement in FixedUpdate (with a speed clamp)

using UnityEngine;

[RequireComponent(typeof(Rigidbody))]
public class Mover : MonoBehaviour
{
    [SerializeField] private float accel = 30f, maxSpeed = 8f;
    private Rigidbody _rb;
    private Vector3 _input;   // set from Update / input system

    private void Awake() => _rb = GetComponent<Rigidbody>();

    private void FixedUpdate()
    {
        _rb.AddForce(_input * accel, ForceMode.Acceleration);     // mass-independent accel
        // Unity 6: linearVelocity (was 'velocity'). Clamp horizontal speed.
        Vector3 flat = new(_rb.linearVelocity.x, 0, _rb.linearVelocity.z);
        if (flat.magnitude > maxSpeed)
        {
            flat = flat.normalized * maxSpeed;
            _rb.linearVelocity = new Vector3(flat.x, _rb.linearVelocity.y, flat.z);
        }
    }
}

ForceMode: Force (continuous, mass-scaled), Acceleration (continuous, ignores mass),
Impulse (instant, mass-scaled — jumps), VelocityChange (instant, ignores mass).

2. Collision vs trigger callbacks

// Solid hit: both have colliders, this one has a (non-kinematic) Rigidbody.
private void OnCollisionEnter(Collision col)
{
    Debug.Log($"Hit {col.gameObject.name} at {col.contacts[0].point}");
}

// Overlap: one collider has 'Is Trigger' = true. Requires a Rigidbody on at least one party.
private void OnTriggerEnter(Collider other)
{
    if (other.CompareTag("Pickup")) Destroy(other.gameObject);
}

3. Ground check with a layer-masked raycast

[SerializeField] private LayerMask groundMask;   // set to your "Ground" layer in the Inspector

private bool IsGrounded()
{
    // Cast a short ray down; only test colliders on groundMask.
    return Physics.Raycast(transform.position, Vector3.down, out RaycastHit hit,
                           1.1f, groundMask);
}

4. Kinematic platform that still pushes bodies

// isKinematic Rigidbody: not driven by forces, but MovePosition interpolates and carries
// resting bodies correctly (unlike moving the Transform directly).
private void FixedUpdate() => _rb.MovePosition(_rb.position + Vector3.right * (2f * Time.fixedDeltaTime));

Pitfalls

  • Rigidbody.velocity doesn't exist in Unity 6 — use linearVelocity (and
    angularVelocity is unchanged).
  • Setting transform.position on a dynamic Rigidbody — teleports it, skips collision.
    Use MovePosition (kinematic/interpolated) or apply forces.
  • Applying forces in Update — frame-rate-dependent and jittery. Physics goes in
    FixedUpdate.
  • Trigger callbacks never fire — triggers need a Rigidbody on at least one of the two
    colliders, and both colliders enabled; two static triggers don't report overlaps.
  • Fast objects pass through walls (tunnelling) — set the Rigidbody's Collision Detection
    to Continuous (or Continuous Dynamic) for bullets/fast movers.
  • Non-uniform-scaled MeshColliders or scaled colliders misbehave; prefer primitive
    colliders and keep scale uniform.
  • Everything collides with everything — wasted cost; assign layers and prune the Layer
    Collision Matrix.

References

  • For raycast variants (SphereCast, RaycastAll, OverlapSphere, LayerMask bit math) and
    joints (FixedJoint, HingeJoint, ConfigurableJoint, breakable joints), read
    references/raycasting-and-joints.md.
  • Primary docs: Unity Manual "Physics" section and ScriptReference/Rigidbody,
    ScriptReference/Physics.Raycast.

Related skills

  • physics-tuning — engine-agnostic feel: fixed timestep, mass/drag, CCD, stability.
  • unity-csharp-scripting — the FixedUpdate/Update split these patterns rely on.
  • unity-navmesh — agent movement that is not force-driven.

常见问题

5 问
答案由本站依据条目字段整理
Unity物理引擎怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_3c6cb52e/unity-physics-sh-t9p516。安装方式为未标注。装完刷新技能列表或重开客户端。

Unity物理引擎支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

Unity物理引擎权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

Unity物理引擎收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

Unity物理引擎用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。