Click or drag to resize
DigitalRuneSimulationSubTimeStepFinished Event
Occurs when an internal time step has finished.

Namespace: DigitalRune.Physics
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.10.0.0 (1.10.0.14427)
Syntax
public event EventHandler SubTimeStepFinished

Value

Type: SystemEventHandler
Remarks

Depending on the size of the current time step the simulation performs a number of sub-steps in Update(TimeSpan). This event can be used to execute code between sub-steps. However, the simulations objects or settings should not be modified between sub-steps. The whole simulation should be treated as read-only. The event handler should be only used to monitor the simulation.

Examples
An event handler could be used to register collisions that happen between full time steps. (Some collision only appear in sub time steps - they are not visible before or after Update(TimeSpan). For example, a rigid body might collide with the floor in one sub time step. The collision might be resolved in the next sub time step: The rigid body bounces off the floor. The event handler could check for contacts that appear between sub time steps and, for example, play a sound effect. To check for collisions check the ContactSets in the CollisionDomain.)
See Also