From a701927d89ff492b1c49f0af071f82376249a246 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Wed, 19 May 2021 10:22:15 +0800 Subject: [PATCH] Fix ragdoll simulation when parent was readded to scene --- scene/3d/physics_body_3d.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 30c5a75bca83..93851aaedd39 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -1958,6 +1958,8 @@ void PhysicalBone3D::_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 = nullptr;