Enemy follow player

hello i want to make the enemy follow the player so please can someone help me I tried to give the enemy the player position using

go.get_position("/player")

but when I make

go.set_position(playerpos)
the enemy don’t follow the player it just like spawn in the player position every frame

go.set_position is used to (instantly) assign a position to a game object.

If you use it at every frame (with the player position as a parameter)… What you see is normal :slight_smile: the enemy teleports itself to the player’s position.

If you want your enemy to follow the player, you need to make it move toward this player, at a certain speed etc.


2 threads talking about that:


Also, maybe you could (re)take a look at the war battles tutorial and try to make the missile aim for a specific object (instead of just moving straight). Would be easier to understand how vectors etc. work.

3 Likes

thanks