Best working and best performing solution I had found for Vampire Survivor like enemy behavior is using phyics.
Threw together a little example for you:
https://drive.google.com/file/d/17eszXFnrcgYShboEL64XVV1iuEX70yWj/view?usp=sharing
Let me know if this works for you! :)
This is such a great idea. Saw it, loved it and implemented it in my project. BUT my enemies are just passing by the player and are leaving the map. I am pretty sure, that there some hidden physics configuration, i miss, because in your example it works great.
Does anybody have an idea, which parameter in can ajust to make my enemies "walk" to the center of gravity (player.x, player.y) and stay there?
Thanks in advance!!! :-)