Description
The Discrete
field of the PhysicsSimulationMode
enum represents a mode of collision detection where physics bodies may pass through thin walls if they are moving very quickly. This mode is optimized for better performance compared to continuous collision detection.
Usage
Use the Discrete
mode when performance is a priority and the simulation does not require precise collision detection for fast-moving objects. This mode is suitable for scenarios where occasional missed collisions are acceptable.
Example
// Example of setting the physics simulation mode to Discrete
PhysicsWorld world = new PhysicsWorld();
world.SimulationMode = PhysicsSimulationMode.Discrete;
// This will configure the physics world to use discrete collision detection,
// which is more performant but less accurate for fast-moving objects.