Cannot move arms up/down with look at script (while using mecanim).

I created a animation for when I have my weapon ready and it is being controlled by the mecanim system. However I just want the arms to move up or down whenever the animation is playing and without any x or z rotation offset.


Here is the animation (it works).


The lookAt target is attached to the camera and moves whenever the camera moves, yet the arms fail to aim and rotate towards the target.

Here’s my script that is suppose to do it:

var leftArm : Transform;
var rightArm : Transform;
var player : GameObject;
var lookTarget : GameObject;

internal var animator : Animator;

function Start ()
{
    animator = GetComponent(Animator);
}

function LateUpdate ()
{
    if (player.weaponReady == true)
    {
        leftArm.Transform.LookAt(lookTarget);
        rightArm.Transform.LookAt(lookTarget);
    }
}

I don’t know if I’m doing the LookAt wrong or I am not doing something with the animator.

I’m not really sure what is the problem, but 1 thing you might want to do, instead of moving the arms, is to move the chest. The arm bones are attached to the chest, so moving the chest will move bother arms the way you want to. Or depending on what you need, you could turn the root bone. If you try to turn both arms, theoretically, this will not result in the result you want, and both that arms are different pivot points, and pivoting from there will cause the hands to be misaligned.

Moving the chest bones won’t look good for the movement (I tested this before).

UPDATE: I turned off the animator and apparently the arms are not moving. So the problem would be that my arms are not looking at the target.