Fix ragdoll simulation when parent was readded to scene

(cherry picked from commit a701927d89)
This commit is contained in:
Haoyu Qiu 2021-05-19 10:22:15 +08:00 committed by Rémi Verschelde
parent 7339de9dbb
commit f89120b895
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -2192,6 +2192,8 @@ void PhysicalBone::_notification(int p_what) {
if (parent_skeleton) {
if (-1 != 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 = NULL;