Help with blending animations

I'm sure it could be a simple problem but I'm having trouble with blending my animations in my models together. I've got some models with animations which my artist gave me from maya, and I've set up the different cycles in the inspector.

What happens though is when I want to change the animation of the object, the animation doesn't finish its cycle properly (e.g. the arms and legs are out of position when going from the walk to idle animation).

I'm declaring the animations in the Start() function as below.

function Start()
{
   if(target == null && GameObject.FindWithTag("Player"))
   {
      target = GameObject.FindWithTag("Player").transform;
   }

   animation.wrapMode = WrapMode.Loop;
   animation.Play("Idle");
   animation["Walk"].wrapMode = WrapMode.Loop;

}

And declaring them as below

function ChasePlayer()
{
   //print ("Chasing Player");
   animation.CrossFade("Walk");
   dir = target.transform.position - transform.position;

   dir = dir.normalized;
   transform.Translate(dir * speed * 5 *  Time.deltaTime, Space.World);
}

Basically what happens exactly is when there is a call to switch animation, the body parts that need to move for the new animation become animated, but the parts that are not animated become frozen in the position they were at when the animation gets changed. Anyone know where the problem is?

That's what happens when you use 'crossfade', the animation(s) that is(are) currently playing blend its weight to zero (fade out) while the new animation blends its weight to one (fade in) along the duration of the crossfade, in practice completely replacing the original animation at the end of the transition.

What you probably want is to playback the idle animation in a higher layer, just set the animation["Walk"].layer = 1 before issuing a play/blend command. Also bear in mind that, in this case, if the idle animation has keyframes set for the legs, they will affect the walk animation, which is probably not what you want. I recommend you bake your animation in your 3D app, deleting the unneeded/conflicting keyframes and, after import, disable unity's own bake in the asset inspector properties.

Good luck!