Просмотр исходного кода

Automatically wake up rigid bodies if user changes the transform.

enn0x 14 лет назад
Родитель
Сommit
84187f6e6d
1 измененных файлов с 5 добавлено и 0 удалено
  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);
       }
     }
+
+    // Activate the body if it has been sleeping
+    if (!_rigid->isActive()) {
+      _rigid->activate(true);
+    }
   }
 }