diff --git a/scene/3d/bone_attachment_3d.cpp b/scene/3d/bone_attachment_3d.cpp index c5d16b763a4..dd6a9901ee0 100644 --- a/scene/3d/bone_attachment_3d.cpp +++ b/scene/3d/bone_attachment_3d.cpp @@ -301,7 +301,12 @@ void BoneAttachment3D::on_skeleton_update() { if (sk) { if (!override_pose) { if (use_external_skeleton) { - set_global_transform(sk->get_global_transform() * sk->get_bone_global_pose(bone_idx)); + if (sk->is_inside_tree()) { + set_global_transform(sk->get_global_transform() * sk->get_bone_global_pose(bone_idx)); + // Else, do nothing, the transform will be set when the skeleton enters the tree: + // Skeleton3D::_notification(NOTIFICATION_ENTER_TREE) -> calls Skeleton3D::_notification(NOTIFICATION_UPDATE_SKELETON) + // -> emits skeleton_updated signal -> connected to BoneAttachment3D::on_skeleton_update() + } } else { set_transform(sk->get_bone_global_pose(bone_idx)); }