Defines motion-related simulation settings.

Namespace: DigitalRune.Physics.Settings
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.5.0.0 (1.5.0.9503)

Syntax

C#
public class MotionSettings
Visual Basic
Public Class MotionSettings
Visual C++
public ref class MotionSettings

Remarks

Continuous Collision Detection (CCD): The purpose of CCD is to detect collisions of fast moving objects that would otherwise be missed. The opposite of CCD is Discrete Collision Detection which only checks for collision at one position for each frame. If the objects move, collisions between the old position and new position are not detected. Example: A bullet (e.g. a small sphere shape) is fired at a wall. In one frame the bullet is in front of the wall. In the next frame the bullet is behind the wall without touching it. If this happens Discrete Collision Detection does not report a collision. This problem is known as "tunneling". CCD is more expensive but detects all collisions. (CCD has some limitations, for example, some collisions that occur because of rotational movement can be missed. But such limitations are hardly noticeable).

Motion Clamping: If CCD is enabled, the Simulation uses a strategy called "Motion Clamping" to deal with fast moving objects: In each time step fast moving objects are only moved to their first time of impact, so that a collision is detected in the next time step. This is obviously not physically correct because the fast moving object moves a smaller distance than it should - but for fast moving objects, like bullets, it is more important to detect all collisions and it is usually not noticeable when the movement distance is clamped.

CCD Settings: CCD can be globally enabled or disabled with CcdEnabled. CCD is only performed for rigid bodies that have a velocity beyond CcdVelocityThreshold and if CcdEnabled is set. Further, a filter predicate method (CcdFilter) can be set. CCD is only used if no predicate method is set or if the predicate method returns trueTruetruetrue (True in Visual Basic) for a pair of rigid bodies.

Inheritance Hierarchy

System..::..Object
  DigitalRune.Physics.Settings..::..MotionSettings

See Also