Support Forum

Erosion Tags Causes Path to Fail in Error?

As seen in the gif, if I click an area that is untraversable, the seeker still finds the path that ends closest to the target. However, if there is a chokepoint of erosion tagged nodes (in this case, the agent cannot traverse the first two erosion tags) the path fails instead of giving the closest valid location.

Anyone know how to deal with this?

Hi

You can set https://arongranberg.com/astar/docs/abpath.html#%20calculatePartial to true which will make it work like you want it. However! Note that for the package to be able to determine which point is the closest one it literally needs to search every node it can possibly reach, which may be slow if you have a large graph. So just keep that in mind.

Thanks, that worked perfectly.

Fortunately my graphs aren’t too large, and the response time doesn’t need to be instant, so I’m now just requesting a path with partials being okay if the first one returns an error, which should almost never happen anyways, as chokepoints from erosion tags alone don’t show up much.

1 Like