I am having some issues with getting an enemy to follow the player.
I have it so that when the player enters the line of sight of the enemy set its angle towards the player and move forward. This works fine however when I try to get the animation to change from idle to attack things go silly. When the player is on the left of the enemy it plays the attack animation but when the player is on the right of the enemy it plays the idle.
I want it to play the attack animation whenever the player is in the line of sight otherwise which back to the idle animation.
Any help would be great,