IsPathPossible on one way NodeLink2

I have a recast graph that gets navmesh cut at runtime. When the cut happens I also add one way NodeLink2s to allow the AI to move into the blocked area but not outside. Some agents detect items that they can pick up from the ground. To check if they can reach them, I make a IsPathPossible call between the item and the agent. This call still returns true even if the agent is unable to reach the item due to the oneway link. I should also note that I use RichAI for the movement. The actual agent seems to detect correctly that he is unable to reach the item so he simply stands there. Is this behavior intended? How should I solve this issue?

Hi

Yes, the IsPathPossible method will ignore one-way links. That information simply isn’t possible to store in the lookup table that the IsPathPossible method uses. Instead, you’d need to do a full path calculation (see Searching for paths - A* Pathfinding Project).

1 Like