File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,12 @@ void BoneAttachment3D::on_skeleton_update() {
301301 if (sk) {
302302 if (!override_pose) {
303303 if (use_external_skeleton) {
304- set_global_transform (sk->get_global_transform () * sk->get_bone_global_pose (bone_idx));
304+ if (sk->is_inside_tree ()) {
305+ set_global_transform (sk->get_global_transform () * sk->get_bone_global_pose (bone_idx));
306+ // Else, do nothing, the transform will be set when the skeleton enters the tree:
307+ // Skeleton3D::_notification(NOTIFICATION_ENTER_TREE) -> calls Skeleton3D::_notification(NOTIFICATION_UPDATE_SKELETON)
308+ // -> emits skeleton_updated signal -> connected to BoneAttachment3D::on_skeleton_update()
309+ }
305310 } else {
306311 set_transform (sk->get_bone_global_pose (bone_idx));
307312 }
You can’t perform that action at this time.
0 commit comments