Function TriangleMeshNode.ClosestPointOnNodeXZInGraphSpace
ClosestPointOnNodeXZInGraphSpace
(Vector3 p)
Closest point on the node when seen from above.
Internal
Int3 ClosestPointOnNodeXZInGraphSpace (
p |
Closest point on the node when seen from above.
This method is mostly for internal use as the Pathfinding.NavmeshBase.Linecast methods use it.
The returned point is the closest one on the node to p when seen from above (relative to the graph). This is important mostly for sloped surfaces.
The returned point is an Int3 point in graph space.
It is guaranteed to be inside the node, so if you call ContainsPointInGraphSpace with the return value from this method the result is guaranteed to be true.
This method is slower than e.g ClosestPointOnNode or ClosestPointOnNodeXZ. However they do not have the same guarantees as this method has.