here is a game object
public GameObject Enemy;
some need variables
public float lookWeight;
public float lookSmoother = 3f;
public Animator animator;
void FixedUpdate() {
animator.SetLookAtPosition(Enemy.transform.position);
lookWeight = Mathf.Lerp(lookWeight,1f,Time.deltaTime * lookSmoother);
and the head is not looking at my enemy … whats wrong ?
added this animator.SetLookAtWeight(lookWeight); and works but buggy when the target is far away the head is looking a bit good towards the target but when the target comes near to the character the head is looking down … and ive checked the pivot points its in the middle of the target mesh
It will look at transform’s position, not mesh pivot.
To look at your character’s face for example, you must tell to look at character’s transform + height; Or look at head joint’s transform, etc.
man the problem is that i puted the target high and its still looking down…