How to make the enemy follow the player if he sees him?

How to make the enemy follow the player if he sees him? Is it possible, to make a camera for the enemy and check with the coordinates of the player? Or do you need to do something else for this?

First of all it depends on your game!
has the enemy a vision range? => check if player and enemy distance is lower this vision range
are there any obstacles that may block the vision?
can enemy walk straight to the player or do you need some path algorithm?

so to start:
try to get the distance between your enemy and your player! Than, in the enemy class, set the “follow” flag (or what ever you coding) to true and start finding your way to the player.

:slight_smile:
Code samples would help us to better help you :wink: