- Home /
[SOLVED] Head and Neck rotation
Hi guys, i need your help with this annoying problem that is bouncing in my head. So i have a dinosaur model, created and rigged by me, that has a head (O.O no, really?!?) and 3 bones for the neck, now i want to put it inside of unity to work on a head movement system that i'll explain with an image (made by me, super detailed image) ![alt text][1] [1]: /storage/temp/13908-head≠ck.png
Ok, the body isn't a problem for now, what i want to do is that the head (the red bullet) looks at the mouse position smoothly (i know that is Input.mousePosition and other stuff with LookRotation), but the problem is the neck (made of 3 bones): the first attached to the body needs to turn in the same direction of the head but with an angle of 1/4 relative to the head, the second 2/4 rel to the head, the third 3/4 and the head...well 4/4 that is the look at function ! This system needs to work for both X and Y axis (i don't know if i'll make it for the Z too). Now i'm stuck at this point. Last question is: do i have to rotate the Head around the FIRST neck pivot, the one attached to the body or it has to rotate around it's own pivot? Thank in advance I Hope you guys can help me out ;) Bye
Answer by TonyLi · Aug 05, 2013 at 01:59 PM
Try the HeadLookController from the 3rd Person Shooter example project. It's pretty simple to set up: Add the script to your dinosaur, assign the bones you want to move, and set their weights. Or you can at least look it over as a model for writing your own control script.
Thanks a lot TonyLi, i'll give it a try and if it works i'll tell you so we can close this answer ;)
Ok guys the HeadLookController works good for what i'm doing, thanks TonyLi for the input ;) If no one needs help here, you can close here
@TheBombix95 please mark the question as answerd (the check mark next to the up/down vote).