Topic was automatically imported from the old Question2Answer platform.
Asked By
OiKeTTLe
I want the enemy to stay a set distance away from the player, and move away when the player breaches that distance. I’m not sure how to set this up. Any ideas on how to achieve this?
Set up an Area2D object with a large collision circle around the enemy, which will be the “fleeing distance”. Once the player enters this Area, the enemy can switch to a “fleeing” mode, moving away from the player until the Area is free again.