com um clique
unity-physics-3d
Unity 3D Physics
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Unity 3D Physics
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Unity ScriptableObject Architecture
Unity Shaders
Unity State Machines
Registers new C# files in resources/manifests/<system>.json (files array + tests.editmode/playmode list) and validates with just validate-registry. Use when creating any new script, adding a new game system, or fixing 'orphan file' CI failures. Trigger phrases: 'add to manifest', 'register file', 'new system', 'validate registry'. Key capabilities: exact JSON manifest format, ACTIVE/DEPRECATED/EXPERIMENTAL status, dependency declarations, test class name mapping for pre-push gating via resolve_module_tests.py. Do NOT use for modifying physics logic or editing game scripts unrelated to registration.
Unity Terrain & Track Creation for RC Racing
Unity Testing, Debugging & QA
Baseado na classificação ocupacional SOC
| name | unity-physics-3d |
| description | Unity 3D Physics |
Use this skill when configuring Rigidbodies, colliders, joints, raycasts, or physics materials in Unity's PhysX-based 3D physics system.
All physics code goes in FixedUpdate, never Update.
void FixedUpdate()
{
// Runs at fixed intervals (default 50Hz = 0.02s)
// Use Time.fixedDeltaTime for calculations
rb.AddForce(Vector3.forward * speed * Time.fixedDeltaTime, ForceMode.Force);
}
void Update()
{
// Variable framerate — for input reading, visuals, UI
// NEVER apply forces or move rigidbodies here
float h = Input.GetAxis("Horizontal"); // Read input here
}
// Project Settings > Time > Fixed Timestep
Time.fixedDeltaTime = 0.02f; // 50 Hz (default)
Time.fixedDeltaTime = 0.01f; // 100 Hz (more accurate, more CPU)
For vehicle or fighting games, consider 100 Hz. For casual games, 50 Hz is fine.
Unity 6: \ was renamed to \ (with an 's') and \ was renamed to . The menu item is now Assets > Create > Physics Material.
Create via Assets > Create > Physics Material.
PhysicsMaterial mat = new PhysicsMaterial("Ice");
mat.staticFriction = 0.05f; // Friction when stationary
mat.dynamicFriction = 0.03f; // Friction when moving
mat.bounciness = 0.1f; // 0 = no bounce, 1 = perfect bounce
mat.frictionCombine = PhysicsMaterialCombine.Minimum; // How two materials combine
mat.bounceCombine = PhysicsMaterialCombine.Maximum;
collider.material = mat;
| Mode | Result |
|---|---|
| Average | (a + b) / 2 |
| Minimum | min(a, b) |
| Maximum | max(a, b) |
| Multiply | a * b |
Priority: Average < Minimum < Multiply < Maximum. The higher-priority mode wins.
Edit > Project Settings > Physics:
| Setting | Default | Notes |
|---|---|---|
| Gravity | (0, -9.81, 0) | Change for moon/space games |
| Default Solver Iterations | 6 | Increase for stable joints/stacking |
| Default Solver Velocity Iterations | 1 | Increase for jitter-free contacts |
| Auto Sync Transforms | true | Set false for performance, call Physics.SyncTransforms() manually |
| Reuse Collision Callbacks | true | Reduces GC in collision callbacks |
NonAlloc variants in hot pathsAuto Sync Transforms and call Physics.SyncTransforms() once per frameGetComponent in collision callbacks — cache references in Awake