Browse Source

Automatically wake up rigid bodies if user changes the transform.

enn0x 14 years ago
parent
commit
84187f6e6d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      panda/src/bullet/bulletRigidBodyNode.cxx

+ 5 - 0
panda/src/bullet/bulletRigidBodyNode.cxx

@@ -236,6 +236,11 @@ transform_changed() {
         shape->set_local_scale(scale);
         shape->set_local_scale(scale);
       }
       }
     }
     }
+
+    // Activate the body if it has been sleeping
+    if (!_rigid->isActive()) {
+      _rigid->activate(true);
+    }
   }
   }
 }
 }