Nate a écrit
I want to get the unity world position of the specified name bone.
I create a SkeletonGraphic in UI,the SkeletonGraphic is subobject of a panel.
when the SkeletonGraphic play an animation,I want to get the world postion of the specified name bone.
But I find the world postion of every bone is same.
SkeletonGraphic skg = GetComponent<SkeletonGraphic>();
Spine.Bone bone = skg.Skeleton.FindBone(boneName);
bone.UpdateWorldTransform();
Vector3 pos = bone.GetWorldPosition(skg.transform);
The pos is always the same as the pos of the root bone
I create a Bone Follower Graphic with the specified name bone.
The Bone Follower Graphic is subobject of the SkeletonGraphic .
I can get the right unity postion of the Bone Follower Graphic.
Transform a = transform.Find("Arm");
Debug.Log(a.position);