Reachability

Is there a simple way to determine whether it is possible to get from some node A to another node B on a point or grid graph? Ideally I’m looking for a way to implement a method “bool canReachEndPoint(Vector2 startCoordinate, Vector2 endCoordinate)” - where it returns false iff there is no route from the desired starting point to the desired finish point.

Any ideas? Does something like this already exist?

Hi

Yes, there is. See http://arongranberg.com/astar/docs/class_pathfinding_1_1_path_utilities.php#a25736e29fdb41bc3f1d57abeaf2c8eef
Note that you will need to set Min Area Size to zero to get the “if and only if” instead of only “false implies there is no path”. See the method documentation in the link, it explains more.

Thanks, that is very helpful