If you try to do path finding on a target that's not reachable the A* algorithm iterates through every possible square in the scene, which is very slow. To solve that I use floodfill to check that the target is reachable. The floodfill checks that both start and target squares are both in the same area.
Ed WelchMember Since 08 Jun 2009
Offline Last Active Sep 30 2013 06:29 PM