diff --git a/panda/src/bullet/bulletRigidBodyNode.cxx b/panda/src/bullet/bulletRigidBodyNode.cxx index b97f768d1b..acd7e96e79 100644 --- a/panda/src/bullet/bulletRigidBodyNode.cxx +++ b/panda/src/bullet/bulletRigidBodyNode.cxx @@ -359,6 +359,20 @@ do_transform_changed() { } } +/** + * + */ +void BulletRigidBodyNode:: +parents_changed() { + + if (_motion.sync_disabled()) return; + + if (get_num_parents() > 0) { + LightMutexHolder holder(BulletWorld::get_global_lock()); + do_transform_changed(); + } +} + /** * */ diff --git a/panda/src/bullet/bulletRigidBodyNode.h b/panda/src/bullet/bulletRigidBodyNode.h index d0e11da6cf..246dec3e6c 100644 --- a/panda/src/bullet/bulletRigidBodyNode.h +++ b/panda/src/bullet/bulletRigidBodyNode.h @@ -112,6 +112,7 @@ public: void do_sync_b2p(); protected: + virtual void parents_changed(); virtual void transform_changed(); private: