Head Look Controller spinning like crazy

Hi,
I’m trying to use the Head Look controller from Unity Blog

I’m using Ethan to test it out, but no matter how I set it up, whatever parts I choose spins around like crazy. I have tried different bones as root and First/Last transform. I have also tried different settings from Head Look and Head Up Vectors. It changes things, but just spinning in other ways.

The script is quite old, so I’m not sure if something has changed, or I’m just doing wrong. He’s supposed to look at the cube, not do a breakdance…

In this case I tried these:
Root node: EthanSkeleton
First transform: EthanSkeleton
Last transform: EthanSpine1

Head look vector 0/0/1
Head up vector 0/1/0

I don’t know why it doesn’t spin to a specific angle and then stops, but it’s spinning somehow in relation to the target, but I can’t figure out what is going on…

Any feedback is greatly appreciated! :slight_smile:

Yeah this is almost a decade old now lol. To get the head to look at an object, you can use inverse kinematics.

To note: This works with characters that have been set up as mecanim humanoids. So double check under the model’s Rig tab that it’s set as ‘humanoid’, rather than ‘Generic’. Ethan I think will automatically be humanoid, but double check.

Thanks! I found the project with this code on the asset store and it worked very well event though it was from unity 3, but when i tried to apply it to other chara it freaked out again.

Thanks for the IK link. I’ll check it. What i wanna do is make an npc navmeshagent look and aim towards it target, and secondary rotate the rest of the body.

Hopefully IK can do that. :slight_smile: