Using standard AIPath, AISeeker and AIDestinationSetter: Do not move when target is not reachable


I’m using the standard components for making my characters follow the player. At the moment they seem a good fit.

However, when they calculate a path where the player is not reachable (like behind a closed door or so), they are moving to the closed point they can reach.

Is it somehow possible with the standard scripts to make them not move at all when they cannot reach the target?

I’ve seen that there is PathUtilities - A* Pathfinding Project an API to check if a path from A to B is possible, so maybe there is some easy possibility to use than with the standard scripts?

Thanks! :slight_smile:


You can reduce the maximum distance that a nearest node search succeeds by reducing A* Inspector → Settings → Max Nearest Node Distance. The paths will fail completely if the distance from the destination to the closest reachable node is higher than this value.

Hi @aron_granberg

Thanks for your fast response!

This seems to work well. However, it outputs an error/warning in the console, that the path has not been found (using “Error Only” log settings).

I understand, that this should be a warning, but not an error, right?

It will now spam the console during development that a path was not found which is exactly what I try to achieve. :slight_smile:


You can disable path logging if you want. The path fails, which is an error as far as the “Error Only” log setting goes.

Sure, but then it would also not log other real path errors?

The “Only Errors” enum refers to failed paths specifically. More critical errors, like using paths incorrectly, or the pathfinding system crashing hypothetically, are always logged no matter what.

1 Like

Understand, that’s what I’m looking for then.

Thank you! :slight_smile: