hello i have an enemy that looks at me and chases me and stuff but it rotates on all the axis to look at me so how do i make it rotate on only the Y axis to look at me? Heres what i've got at the moment.
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(target.position - transform.position),rotationSpeed * Time.deltaTime);
Thanks.