I have some code for making the enemy look at the character but it rotates it face to look at me
This is what it looks like in game and scene view. The characters have rotated their faces to look at me whereas i would only like their edge to look at me. This is my code:
Vector3 lookAtGoal = new Vector3(player.position.x, this.transform.position.y, player.position.z);
this.transform.LookAt(lookAtGoal);