I'm trying to figure out my first custom movement, I kind of got it working, but it's a little buggy and I could use some pointers.
The idea is, that once in a while: player.x is < then enemy.x the enemy moves in the players x direction, and the same for the y position.
I can get the enemy to do the movement, but sometimes it's confused whether to move up or down, does anyone have any tricks to teach me?
(I'm trying to get the enemy to move like in the old arcade game Berzerk)
My current setup: