Version: 2022.3
Language : English
Discrete collision detection
Sweep-based CCD

Continuous collision detection (CCD)

Continuous 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 (CCD) modes use predictive algorithms to calculate collisions that happen between physics timesteps. They are more accurate, but usually require more computational resources than 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

CCD is supported for Box, Sphere and Capsule 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
. It is intended as a safety net to catch collisions in cases where colliders would otherwise pass through each other. However, it does not always deliver physically accurate collision results, so you might still consider decreasing the physics timestep frequency to make the simulation more precise.

In Unity, there are two CCD algorithms, represented by three Collision Detection mode options.

Topic Description
Speculative CCD Learn about speculative collision detection. Continuous Speculative uses speculative collision detection.
Sweep-based CCD Learn about sweep-based collision detection. Both Continuous and Continuous Dynamic modes use sweep-based collision detection.
Discrete collision detection
Sweep-based CCD
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。