diff options
author | ShyRed <ShyRed@users.noreply.github.com> | 2019-04-06 17:11:36 +0200 |
---|---|---|
committer | ShyRed <ShyRed@users.noreply.github.com> | 2019-04-06 17:11:36 +0200 |
commit | 0877cf64192c60e2c7a47250a8a44a4d70d8ff54 (patch) | |
tree | 912c67c3047a94c0a7994ab11507334fc749c52e | |
parent | 74719b8748d338c143a62b3659693af0d82b784c (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.cpp | 2 |
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; } |