update body gravity when proper dirty bits are set

This commit is contained in:
Andrew Meadows 2015-05-06 11:46:25 -07:00
parent e61470517c
commit 646661d037

View file

@ -129,6 +129,7 @@ void ObjectMotionState::handleEasyChanges(uint32_t flags) {
if (flags & EntityItem::DIRTY_LINEAR_VELOCITY) {
_body->setLinearVelocity(glmToBullet(getObjectLinearVelocity()));
_body->setGravity(glmToBullet(getObjectGravity()));
}
if (flags & EntityItem::DIRTY_ANGULAR_VELOCITY) {
_body->setAngularVelocity(glmToBullet(getObjectAngularVelocity()));