Fix ragdoll simulation when parent was readded to scene
(cherry picked from commit a701927d89
)
This commit is contained in:
parent
cca2a9d2d5
commit
f75ace5ac5
1 changed files with 2 additions and 0 deletions
|
@ -2077,6 +2077,8 @@ void PhysicalBone::_notification(int p_what) {
|
||||||
if (parent_skeleton) {
|
if (parent_skeleton) {
|
||||||
if (-1 != bone_id) {
|
if (-1 != bone_id) {
|
||||||
parent_skeleton->unbind_physical_bone_from_bone(bone_id);
|
parent_skeleton->unbind_physical_bone_from_bone(bone_id);
|
||||||
|
parent_skeleton->unbind_child_node_from_bone(bone_id, this);
|
||||||
|
bone_id = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parent_skeleton = nullptr;
|
parent_skeleton = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue