PHYSICS ARCHITECTURE
UNITY RIGIDBODY EXPLAINED FOR GAME DEVELOPERS
A complete deep dive into PhysX physics simulation, ForceModes, continuous collision detection, and performance optimizations.
Quick Summary
The Rigidbody component places a GameObject under the control of Unity's PhysX physics engine. It enables gravity, mass, collision reactions, and velocity. To avoid physics bugs and performance spikes, always modify Rigidbody state inside FixedUpdate() and use AddForce() or MovePosition() instead of direct Transform changes.
Key Properties & Best Practices
- Mass (kg): The relative mass of the object. Keep realistic ratios between colliding bodies (e.g. 1500 kg car vs 80 kg barrel). Ratios higher than 100:1 can cause PhysX solver instability.
- Linear Damping / Drag: Simulates air resistance.
0= frictionless space vacuum;0.5 - 1.5= realistic terrestrial atmosphere. - Angular Damping / Angular Drag: Rotational resistance. Prevents rolling barrels or spinning cars from rotating forever.
- IsKinematic: When enabled, the object ignores forces and gravity, but can still push non-kinematic dynamic Rigidbodies. Essential for moving elevators, platforms, and kinematic doors.
- Interpolate: Interpolates the physics transform between frames. Always set to
Interpolateon player avatars and vehicles to eliminate jitter with 144Hz monitors. - Collision Detection:
Discrete:Fast, default. Best for slow-moving objects and scenery.Continuous / Continuous Speculative:Prevents high-speed bullets or missiles from tunneling through thin walls.
★
Understanding ForceMode in C#
C# ForceMode Cheatsheet
// 1. ForceMode.Force: Continuous force, dependent on mass (e.g. constant rocket engine thrust)
rb.AddForce(transform.forward * 1000f, ForceMode.Force);
// 2. ForceMode.Acceleration: Continuous acceleration, ignores mass (e.g. custom gravity field)
rb.AddForce(Vector3.down * 9.81f, ForceMode.Acceleration);
// 3. ForceMode.Impulse: Instantaneous punch, dependent on mass (e.g. explosive blast, grenade hit)
rb.AddForce(blastDirection * 500f, ForceMode.Impulse);
// 4. ForceMode.VelocityChange: Instantaneous velocity jump, ignores mass (e.g. jump pad, dash ability)
rb.AddForce(Vector3.up * 8f, ForceMode.VelocityChange);
Rigidbody Not Moving or Glitching?
Check out our dedicated troubleshooting guide: Unity Rigidbody Not Working Solution →