Make plane enemies have wider turns with Vector2.movetowards().


I have made a top down airplane game but have gotten stumped on make the enemies more enjoyable to kill. The problem is the enemies constantly fly to you, and look at you. So you can’t get behind them, and you spend the entire game running, quickly turning around and shooting, and then still running. I wondered if you could give me some pointers or a tutorial on making the enemies have wider turns so the player can get behind them without them just flipping around.

Thank you.

Move towards has a maxDistanceDelta (step) argument, if you decrease this step it should turn slower.

transform.position = Vector2.MoveTowards(transform.position, target, Time.DeltaTime * turnSpeed);

If you are looking for making the enemy flying a bit more interesting and if it fits in your game, you might want to take a look into steering behaviours, which allow you to use behaviours such as seek, flee, evade, pursue, etc.