Nearest walkable with ITraversalProvider

Hi

For that you will have to also override the NNConstraint. Sorry about the potentially duplicate code there.
The reason is that the ITraversalProvider only says which nodes the agent can traverse, but it doesn’t actually change how the search for the closest node to the start and end point is being done. This is mostly due to compatibility and historical reasons though, it is not the best design.

public MyNNConstraint : PathNNConstraint {
     public override bool Suitable (GraphNode node) {
            if (your code here) return false;
            return base.Suitable(node);
     }
}
myPath.nnConstraint = new MyNNConstraint();

You will also have to set calculatePartial to true as you have already done.

I haven’t tested the above though, so I might have forgotten something. I think this should work though.