I have an animation (photo 1). When shooting, the upper body rotates (photo 2). Now I want to make the arrow rotate exactly according to a given vector how to do it.
Thanks so much for your help!
Object orientation Problem
- Uređeno
You want to set the rotation of a bone the arrow is parented to? Or you want to get the rotation of a bone so you can apply it to the arrow (which I assume is a Unity GameObject)?
I want to set the rotation of a bone the arrow is parented to. I can control by changing the position of torso_target bone (Orange dot) but I don't know how to set the torso_target position in the right way: ((
You can manipulate bones through code, but it's likely easier to position a target bone and let IK do the rest. Check out the spineboy demo here (drag the red circles around):
Spine: Demos
You can look at the spineboy example project to see how it is rigged and it is explained here:
Spineboy example
Anyway, to move the target bone around you can use spine-unity's SkeletonUtility
. This allows you to have a bone follow a GameObject (which likely is what you want), or a GameObject follow a bone.