Hi.
I have a 3rd Person camera behind my player and it’s looking at one target (aimTarget), I want the player points its arm at that aimTarget by rotating bones. Player has a mecanim controller. Technically I want to make a shoot animation by code. Using Unity Free so I can’t use IK (I think). I’ve tried this already:
function LateUpdate(){
var aimDir = aimTarget.position - shoulder.transform.position;
shoulder.transform.localRotation = Quaternion.Lerp(shoulder.transform.rotation, Quaternion.LookRotation(aimDir), Time.deltaTime * 20.0);
}
Used LookAt an localEulerAngles but just get crazy arm movements.
Thanks.