Переглянути джерело

Merge pull request #4325 from SaracenOne/bone_attachment_reposition

BoneAttachments now position themselves instantly during bind.
Rémi Verschelde 9 роки тому
батько
коміт
bf0f914140
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      scene/3d/bone_attachment.cpp

+ 1 - 0
scene/3d/bone_attachment.cpp

@@ -80,6 +80,7 @@ void BoneAttachment::_check_bind() {
 		int idx = sk->find_bone(bone_name);
 		if (idx!=-1) {
 			sk->bind_child_node_to_bone(idx,this);;
+			set_transform(sk->get_bone_global_pose(idx));
 			bound=true;
 		}
 	}