I'm making a game where there's a person sprite that should avoid your character.
how do I make it so that the person avoids you when you move close?
Is the sprite just being physically pushed away or do you mean it should pathfind to a position specifically in a direction away from the player?
i want it to pathfind to a position specifically in a direction away from the player
Develop games in your browser. Powerful, performant & highly capable.
Have a look at this example for basic pathfinding to avoid the player.
1drv.ms/u/s!AkmrWgxeuxlKhJkSc_-op8aY-pn92w