Fix missing re-activation of bullet physics sleep feature

Adds the missing option of re-enabling the sleep feature in bullet physics once a body had the sleep feature disabled.
This commit is contained in:
ShyRed 2019-04-06 17:11:36 +02:00
parent 74719b8748
commit 0877cf6419

View file

@ -597,6 +597,8 @@ void RigidBodyBullet::set_state(PhysicsServer::BodyState p_state, const Variant
if (!can_sleep) {
// Can't sleep
btBody->forceActivationState(DISABLE_DEACTIVATION);
} else {
btBody->forceActivationState(ACTIVE_TAG);
}
break;
}