Enum ContinuousDetectionMode
- Namespace
- BepuPhysics.Collidables
- Assembly
- BepuPhysics.dll
Defines how a collidable will handle collision detection in the presence of velocity.
public enum ContinuousDetectionMode
Fields
Continuous = 2
Collision detection will start with a sweep test to identify a likely time of impact. Speculative contacts will be generated for the predicted collision.
This mode can capture angular motion with very few ghost collisions. It can, however, miss secondary collisions that would have occurred due to the primary impact's velocity change.
Discrete = 0
No sweep tests are performed. Default speculative contact generation will occur within the speculative margin.
The collidable's bounding box will not be expanded by velocity beyond the speculative margin.
This is the cheapest mode. If a Discrete mode collidable is moving quickly and the maximum speculative margin is limited, the fact that its bounding box is not expanded may cause it to miss a collision even with a non-Discrete collidable.
Passive = 1
No sweep tests are performed. Default speculative contact generation will occur within the speculative margin.
The collidable's bounding box will be expanded by velocity without being limited by the speculative margin.
This is useful when a collidable may move quickly and does not itself require continuous detection, but there exist other collidables with continuous modes that should avoid missing collisions.