Version: 2022.3
Language : English
Choose a collision detection mode
Continuous collision detection (CCD)

Discrete collision detection

The Discrete 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
detection mode uses a discrete collision detectionAn automatic process performed by Unity which determines whether a moving GameObject with a Rigidbody and collider component has come into contact with any other colliders. More info
See in Glossary
algorithm, which checks for collisions on each physics timestep.

Discrete is the default collision detection mode, and by far the least computationally demanding. However, it can miss collisions that occur between physics steps, so it’s usually not suitable for fast-moving collisions.

If your collisions happen too quickly for discrete collision to pick them up, you can try one or both of the following solutions:

  • Increase the frequency of physics timesteps. This can solve missed collisions for fast-moving objects, but comes with a high performance impact due to the extra calculations required.
  • Use one of the continuous collision detection (CCD) modes. These can predict collisions that might occur between physics timesteps, but they also have a higher performance impact.

Experiment with both and profile the results to find the right solution for your project.

Choose a collision detection mode
Continuous collision detection (CCD)
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961