Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Yamz |
I want to make an Enemy start to move but with the same direction of the player “to follow it” You can get that Vector2 to match your directions
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Yamz |
I want to make an Enemy start to move but with the same direction of the player “to follow it” You can get that Vector2 to match your directions
Reply From: | Magso |
The simplest way would be to get the players position then add a Vector2
offset.
var offset : Vector2
enemy.position = player.position + offset
The offset will have to be changed depending on any other functionalities you want on the enemy.