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
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
thinhnv1411
  • Messaggi: 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] ----------------+
Avatar utente
Harald

Harri
  • Messaggi: 4208

thinhnv1411

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

Harald

Glad it helped, thanks for getting back to us.
Avatar utente
Harald

Harri
  • Messaggi: 4208


Torna a Unity