thinhnv1411

Hi guys, i'm not a dev. I'm trying to make a simple game with Unity Visual Scripting. I want to get bone position from spine to unity.
I cannot get the right X, Y transform. Can u guys help me.
Sorry for my bad English
You do not have the required permissions to view the files attached to this post.
thinhnv1411
  • Posts: 3

Harald

Please check out the BoneFollower component:
spine-unity Runtime Documentation: BoneFollower

In general we recommend to always have a look at the spine-unity documentation page first, as it covers many common tasks and problems:
spine-unity Runtime Documentation

If any time you want to use visual scripting, you still need to follow the programming documentation sections, because visual scripting basically just turns every "word" of code into a Node (just without assigning variables for easier reading).
So
Bone bone = skeletonAnimation.Skeleton.FindBone("boneName");
Vector3 worldPosition = bone.GetWorldPosition(skeletonAnimation.transform);
would result in
[skeletonAnimation] --> [Skeleton] --> [FindBone "boneName"] --> [GetWorldPosition]
| ^
| |
+---------------------------------> [transform] ----------------+
User avatar
Harald

Harri
  • Posts: 4164

thinhnv1411

Thanks alot <3 Bone Follower is very easy to use. I ll read more document
thinhnv1411
  • Posts: 3

Harald

Glad it helped, thanks for getting back to us.
User avatar
Harald

Harri
  • Posts: 4164


Return to Unity