mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
bullet: sync rigid body transform when node is reparented
Reparenting a node will change its net transform, so it should cause a transform sync. Fixes #629
This commit is contained in:
parent
e8fc76747a
commit
f183d901cb
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -112,6 +112,7 @@ public:
|
||||
void do_sync_b2p();
|
||||
|
||||
protected:
|
||||
virtual void parents_changed();
|
||||
virtual void transform_changed();
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user