mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
sync RigidBody on deactivation
This commit is contained in:
parent
a16760278e
commit
9c9eb87925
1 changed files with 5 additions and 0 deletions
|
@ -104,6 +104,11 @@ void EntityMotionState::handleDeactivation() {
|
|||
_entity->setOrientation(_serverRotation, success, false);
|
||||
_entity->setVelocity(ENTITY_ITEM_ZERO_VEC3);
|
||||
_entity->setAngularVelocity(ENTITY_ITEM_ZERO_VEC3);
|
||||
// and also to RigidBody
|
||||
btTransform worldTrans;
|
||||
worldTrans.setOrigin(glmToBullet(_serverPosition));
|
||||
worldTrans.setRotation(glmToBullet(_serverRotation));
|
||||
// no need to update velocities... should already be zero
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
Loading…
Reference in a new issue