IsPointOnNavMesh need fix in Recast graph

IsPointOnNavmesh() returns True even when a point outside the Recast graph is provided.

The reason seems to be that the function considers height without limitation. For example, even if you provide a point that is not on the graph on the second floor, IsPointOnNavMesh returns True if there is a graph directly below that point on the first floor.

Could you please help me resolve this issue?

Hi

This is working precisely as designed. If you need to consider height as well, then you can use the GetNearest method together with the NNConstraint.distanceMetric set to ClosestAsSeenFromAbove.

I’ll clarify the documentation.

It works as intended when I use ‘ClosestAsSeenFromAboveSoft’ instead of ‘ClosestAsSeenFromAbove’, though I’m not entirely sure about the underlying principle."