NPC that runs away from the player with pathfinding?

How would i go about making an NPC that runs away from a player with pathfinding.

I only want to do pathfing because, I dont want it to get stuck at wall, eg. I want it to walk around walls so it cant get trapped by the player.

if you can achieve this without pathfing, please let me know!

1 Like