This question already has an answer here:
I have a 2048x2048 map and if I path-find to an unreachable location, it makes the pathfinder go through every node on the map which freezes the thread for 4 seconds.
How can I reduce that time?
- I'm using JPS
- It's a dynamic map (it changes at runtime)