I have following script, how can i find position of mouse to look at? I wan’t to make a script like Mouse Look in Standard Assets FPS, but for Mecanim.
using UnityEngine;
using System.Collections;
public class HeadLook : MonoBehaviour {
Animator animator;
void OnAnimatorIK (){
Vector3 target = ???
animator.SetLookAtPosition (target);
animator.SetLookAtWeight(1.0f);
}
void Start ()
{
animator=GetComponent<Animator>();
}
}