I am currently using this script to make an enemy face the player :
public float speed;
private Transform player;
void Start()
{
player = GameObject.FindWithTag ("Shooter").transform;
}
void Update ()
{
float z = Mathf.Atan2 ((player.transform.position.y - transform.position.y), (player.transform.position.x - transform.position.x)) * Mathf.Rad2Deg -90 ;
transform.eulerAngles = new Vector3 (0, 0, z);
}
How can I slow down this rotation ? The enemy should take a small amount of time to face the player.