Hi! I try to rotate a enemy, he must look at player and walk to him when he pass through a collider (trigger). the game is a isometric rpg, the enemy must rotate in the Y axis.
I have actualy this in Enemy script:
void Update()
{
EP = transform.position - target.transform.position; //targes is a player gameObject
//transform.LookAt (target.transform); this doestn work :/
transform.Translate (EP.normalized * vel * Time.deltaTime);
}
please forgive my poor english, and i help me!
thanks!!