[This is preliminary documentation and is subject to change.]

Returns a point on the boundary closest to the source point if the source point is outside the polygon's xz-column.

Namespace: org.critterai.nav
Assembly: cai-nav (in cai-nav.dll) Version: 0.4.0.0 (0.4.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public NavStatus GetNearestPointF(
	uint polyRef,
	Vector3 sourcePoint,
	out Vector3 resultPoint
)
Public Function GetNearestPointF ( _
	polyRef As UInteger, _
	sourcePoint As Vector3, _
	<OutAttribute> ByRef resultPoint As Vector3 _
) As NavStatus
public:
NavStatus GetNearestPointF(
	unsigned int polyRef, 
	Vector3 sourcePoint, 
	[OutAttribute] Vector3% resultPoint
)

Parameters

polyRef
UInt32
The polygon reference.
sourcePoint
Vector3
The point to check.
resultPoint
Vector3%
The closest point.

Return Value

The NavStatus flags for the query.

Remarks

Much faster than the other nearest point methods.

If the provided point lies within the polygon's xz-column (above or below), then the source and result points will be equal.

The boundary point will be the polygon boundary, not the height corrected detail boundary. Use GetPolyHeight(NavmeshPoint, Single%) if needed.

The source point does not have to be within the bounds of the navigation mesh.

See Also