Version: Unity 6.2 (6000.2)
Language : English
Joint and Ragdoll stability
Optimize the physics system for CPU usage

Optimize physics performance

Optimize physics system performance in the Unity Editor.

Use the guidance in these pages to optimize the physics system so you can maintain your target frame rate and ensure smooth, responsive gameplay. The instructions in these pages address issues identified by Unity Editor diagnostic tools. Before you apply the optimizations described in the documentation in this section and throughout your development, you must be familiar with these diagnostic tools:

  • The Unity Profiler: The Profiler is the primary tool to measure CPU performance. The Profiler helps identify bottlenecks in your project, particularly in areas such as Physics.FixedUpdate and Physics.Simulate, and in its detailed breakdowns of physics phases such as broad phase and narrow phase processing. To open the Profiler window, go to Window > Analysis > Profiler.
  • The Memory Profiler: Use the Memory ProfilerA window that helps you to optimize your game. It shows how much time is spent in the various areas of your game. For example, it can report the percentage of time spent rendering, animating, or in your game logic. More info
    See in Glossary
    to identify and optimize memory allocations caused by physics operations, such as excessive RaycastHit arrays or frequent collisionA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info
    See in Glossary
    data creation. You can use this information to reduce your garbage collection overhead.
  • The Physics Debug window: Use this tool to visually diagnose physics-related performance issues. It displays collision shapes, contacts, broad phase bounding boxes, and Rigidbody component sleep states. This helps you identify areas like overly complex colliders, unnecessary interactions, or objects failing to sleep, all of which contribute to performance bottlenecks. To open the Physics Debug window, select Window > Analysis > Physics Debug.
Topic Description
Optimize the physics system for CPU usage Optimize Unity’s physics system’s CPU usage by adjusting simulation frequency, managing collidersAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary
, and configuring RigidbodyA component that allows a GameObject to be affected by simulated gravity and other forces. More info
See in Glossary
components.
Optimize the physics system for memory usage Optimize Unity’s physics system’s memory usage by controlling collision callbacks and optimizing physics queries.

Additional resources

Joint and Ragdoll stability
Optimize the physics system for CPU usage