Assistance with best practice for scenario

So I have an interesting dilemma.

I have a 500x400 map where multistory buildings can be placed.

My issue

  • I have an elevator system
  • the trouble with what i am seeing is that if my agent is on the 5th floor and the target destination is on the 5th floor of another building, they will walk to the nearest point and keep trying to move through the wall even though there is mo path to the destination (other than getting on the elevator.

My question

  • what can I call to check is the agent doesnt have a path? I need to understand how i might detect when an agent cant reach the destination regardless of recalculating the path, etc…

Of course i am not asking help with the elevator part as I ccreated the elevator logic, but I need to know how I can make the agent intelligent enough to know it has no path so that I can use that trigger to try an alternative i.e. my elevator system instead.

Hi

You can determine if two points are reachable using PathUtilities.IsPathPossible.
See https://arongranberg.com/astar/docs/pathutilities.html#IsPathPossible

1 Like