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?
Develop games in your browser. Powerful, performant & highly capable.
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
Have a look at this example for basic pathfinding to avoid the player.