Enemy slower nearer the player it gets
Hello, does anyone know how to make a script to make the enemy slower depending on how close they get to the player? (the game is in unity, 2d and it's top down if that helps. c# ofc)
1 Reply
just decrease the movement speed based on the distance between enemy and player
it isn't a logic thing but rather a math thing
as long as you have a variable for movement speed or similar