SimulationTimeScaling Property |
Namespace: DigitalRune.Physics
Exception | Condition |
---|---|
ArgumentOutOfRangeException | value is negative. |
This is a factor which speeds up or slows down the simulation. Use a value less than 1 to create slow motion effects.
The fixed time step size (FixedTimeStep) is not automatically scaled to keep the simulation results consistent. That means, if the time scaling is set to 2, the simulation makes twice as much steps as usual when Update(TimeSpan) is called. If the time scaling is set to 0.1 to create a slow motion effect, the simulation performs only 1 / 10 of the usual simulation steps. - This standard behavior keeps the simulation accuracy constant.
If constant accuracy is not required, you might want to scale FixedTimeStep manually with this scaling factor. Then the simulation accuracy will change with the time scaling factor. Especially, when a time scaling less than 1 ("slow motion") is used, it might be necessary to make the fixed time step smaller to keep the simulation results fluid.