Upper Torso IK

I have been working with mecanim’s IK system trying to get the upper torso of my character to face the mouse position.

The Unity Docs are very unclear on what the functions do but from what I have gathered Animator.SetLookAtPosition only affects the head. Also Animator.SetIKRotation and Animator.SetIKPosition only work for arms and legs.

How would I go about setting IK for the complete upper torso similar to Unity’s Angry Bot project?

Thanks

Although this question is now a little old and no doubt the original poster has resolved their issue, I thought I would share what i have learned from ‘C# Accent Tutorials’ YouTube videos;

These tuts have been invaluable to get torso working, and again it appears that it is actually quite easy now (Unity 5 i guess - I only started with 5 so am not sure of before that) using Just 2 Calls, Setting the weights of the following parts, and the Looktarget;

// Set our Look Weights
m_Anim.SetLookAtWeight(m_LookWeight, m_BodyWeight, m_HeadWeight, m_EyesWeight, m_ClampWeight);   
// Set the Look At Position which is a point along the camera direction     
m_Anim.SetLookAtPosition(m_LookTarget);

Setting m_LookWeight = 1, m_BodyWeight = 0.25f, m_HeadWeight = 0.9f, m_EyesWeight = 1, m_ClampWeight = 1 returns a pretty nice articulation of upper body parts for looking at the looktarget, which I’ve set to a point a little in front of the camera (and player) so there’s something to follow.

You will of course need to enable IK In Mecanim Layer, ticking the IK Pass checkflag as well.

I hope this answers this question!