PseudoCode for Enemy AI

//Defining the roadmap of the enemy AI’s behaviour

//Get a vector that points in the direction of the player. Call the vector toTarget

//Normalize toTarget so that we get the direction vector component

//Multiply toTarget with the speed of the enemy so that the enemy moves in the direction of the player

//Actually move the enemy by changing the worldPos i.e goblin.setworldPos()

Privacy & Terms