git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@112 92aac97c-a6ce-11dd-a772-7fcde58d38e6

This commit is contained in:
chappuis.daniel 2009-03-07 14:40:32 +00:00
parent 320913007c
commit f72fdc428d

View File

@ -46,6 +46,13 @@ DynamicEngine::~DynamicEngine() {
// Update the state of a rigid body // Update the state of a rigid body
void DynamicEngine::updateBodyState(RigidBody* const rigidBody) { void DynamicEngine::updateBodyState(RigidBody* const rigidBody) {
// If the gravity force is on
if(world->getIsGravityOn()) {
// Apply the current gravity force to the body
rigidBody->getCurrentBodyState().setForce(world->getGravity());
}
// The current body state of the body becomes the previous body state // The current body state of the body becomes the previous body state
rigidBody->updatePreviousBodyState(); rigidBody->updatePreviousBodyState();