True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

void TA::Physics::Update (
float   fDt  )
 

Call this function to update the physics simulation one frame.

The frequency that this function is called at will have an effect on the Physics simulation. In an ideal world, the simulation should be updated at a constant 60 frames per second. However, this is not necessary, the simulation will still run well at lower frame rates. The use of swept collision detection allows the simulation to still perform satisfactorily at frame rats as low as 15 frames per second.

It is recommended, at low frame rates, that:

  • time is slowed down to allow the physics to cope; and/or
  • Update is called multiple times per frame.

Things that may vary with a changing update rate:

  • The force required to keep an object from falling through the ground will increase as frame rate lowers. This may be observed in the value of TA::Collision::fImpulse found in collisions obtained through TA::DynamicObject::GetCollisionIterator;
  • The stability of stacking objects will reduce at low frame rates;
  • Acceleration due to gravity may vary slightly;
  • Motion damping may vary slightly;
  • Friction may be noticeably inconsistent.

If it is crucial that a physics simulation be consistent, it will be necessary to call update at a constant rate. More support to help make this easier may be added in the future.

Parameters:
fDt
Time elapsed, in seconds, since the last call to TA::Physics::Update.
Examples:
SimplePhysicsSimulationExample.cpp.



© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.