Mechanim head look at blend

Hi there,

I've been having a look around and haven't found a solution for this. Hopefully I'm just not looking right because this surely is a common problem but I was trying to blend some head "lookat" animation on the character's head over the existing animation but I can't seem to do it.

There's Animator.SetLookPosition but I have no idea how to use it...

Can someone point me in the right direction here?

Thanks
Pete

Animator.SetLookPosition works only on humanoid heads.

I am using the HeadLookController from the wiki on a non-humanoid, Mecanim-controlled character.


Since this uses IK, it requires Unity Pro. It procedurally (i.e., via code) adjusts the head after the state machine's animations have been applied. As StarManta writes, you could also procedurally adjust the head using the HeadLookController script if you don't have Unity Pro. Or buy and use Final IK.

Or, since you mentioned blends, you could skip IK and blend head motion in a head layer in your animation state machine. IK is generally preferable. But, to do this method, you can create a head layer with a 2D blend tree. Blend on two float parameters, say LookVertical and LookHorizontal. Blend between four animations: look up, look down, look left, and look right. By adjusting the parameters, you can move the head all around.

Hey thanks guys, I had no idea about Final IK. I'm using my own I'm IK system but that looks pretty intersting.
I think I'll have a look at the script first and go from there.

Pete