git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@112 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
320913007c
commit
f72fdc428d
|
@ -46,6 +46,13 @@ DynamicEngine::~DynamicEngine() {
|
|||
|
||||
// Update the state of a rigid body
|
||||
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
|
||||
rigidBody->updatePreviousBodyState();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user