PathUtilities.IsPathPossible always returns true

I am using PathUtilities.IsPathPossible before setting the destination of my wandering AI, but they are still picking position that are not reachable (blue circle gizmos):

Im I doing something wrong?

Generating a random point in a radius:

public Vector3 GenerateRandomPoint()
        Vector2 point = Random.insideUnitCircle * radius;
        Vector3 dest = new Vector3(point.x, 0, point.y) + transform.position;

        return dest;

Checking if point is reachable:

public bool IsPathPossible(Vector3 destination)
        GraphNode node1 =, NNConstraint.Default).node;
        GraphNode node2 =, NNConstraint.Default).node;

        return PathUtilities.IsPathPossible(node1, node2);

    public void Enter()
        var point = area.GenerateRandomPoint();

        if (!IsPathPossible(point))
            Debug.Log( + " just set an unwalkable path");

In the above code, IsPathPossible never returns false.


One thing I can see is that you are using NNConstraint.Default. This will make it search for the closest walkable node. So if your destination was in the middle of the lake it would still find the closest point on the shore. Try using NNConstraint.None instead, which will return the closest node regardless of if it is walkable or not.


This seems to work:

public Vector3 GetNearestWalkableNodePos(Vector3 origin)
        GraphNode node =, NNConstraint.Default).node;

        Vector3 nodePosition = (Vector3)node.position;

        return nodePosition;