mirror of
https://github.com/chenasraf/redot-engine.git
synced 2026-05-18 01:39:11 +00:00
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.
(cherry picked from commit 0877cf6419)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user