summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShyRed <ShyRed@users.noreply.github.com>2019-04-06 17:11:36 +0200
committerShyRed <ShyRed@users.noreply.github.com>2019-04-06 17:11:36 +0200
commit0877cf64192c60e2c7a47250a8a44a4d70d8ff54 (patch)
tree912c67c3047a94c0a7994ab11507334fc749c52e
parent74719b8748d338c143a62b3659693af0d82b784c (diff)
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.
-rw-r--r--modules/bullet/rigid_body_bullet.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 22f2214898..e5f70a0b34 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -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;
}