Selaa lähdekoodia

Merge pull request #27730 from ShyRed/fix3dphyscansleep

Fix missing re-activation of bullet physics sleep feature
Hein-Pieter van Braam 6 vuotta sitten
vanhempi
commit
7ba772d4ba
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      modules/bullet/rigid_body_bullet.cpp

+ 2 - 0
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;
 	}