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.

