Browse Source

Merge pull request #14978 from AndreaCatania/intshap

Fixed dispatch callback
Juan Linietsky 7 years ago
parent
commit
9969c5c6a1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/bullet/rigid_body_bullet.cpp

+ 1 - 1
modules/bullet/rigid_body_bullet.cpp

@@ -339,7 +339,7 @@ void RigidBodyBullet::set_space(SpaceBullet *p_space) {
 
 void RigidBodyBullet::dispatch_callbacks() {
 	/// The check isTransformChanged is necessary in order to call integrated forces only when the first transform is sent
-	if (previousActiveState != btBody->isActive() && force_integration_callback && isTransformChanged) {
+	if ((btBody->isActive() || previousActiveState != btBody->isActive()) && force_integration_callback && isTransformChanged) {
 
 		BulletPhysicsDirectBodyState *bodyDirect = BulletPhysicsDirectBodyState::get_singleton(this);