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

Returns the distance from the specified position to the nearest polygon wall.

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 FindDistanceToWall(
	NavmeshPoint searchPoint,
	float searchRadius,
	NavmeshQueryFilter filter,
	out float distance,
	out Vector3 closestPoint,
	out Vector3 normal
)
Public Function FindDistanceToWall ( _
	searchPoint As NavmeshPoint, _
	searchRadius As Single, _
	filter As NavmeshQueryFilter, _
	<OutAttribute> ByRef distance As Single, _
	<OutAttribute> ByRef closestPoint As Vector3, _
	<OutAttribute> ByRef normal As Vector3 _
) As NavStatus
public:
NavStatus FindDistanceToWall(
	NavmeshPoint searchPoint, 
	float searchRadius, 
	NavmeshQueryFilter^ filter, 
	[OutAttribute] float% distance, 
	[OutAttribute] Vector3% closestPoint, 
	[OutAttribute] Vector3% normal
)

Parameters

searchPoint
NavmeshPoint
The center of the search circle.
searchRadius
Single
The radius of the search circle.
filter
NavmeshQueryFilter
The filter to apply to the query.
distance
Single%
Distance to nearest wall.
closestPoint
Vector3%
The nearest point on the wall.
normal
Vector3%
The normalized ray formed from the wall point to the source point.

Return Value

The NavStatus flags for the query.

Remarks

The closest point is not height adjusted using the detail data. Use GetPolyHeight(NavmeshPoint, Single%) if needed.

The distance will equal the search radius if there is no wall within the radius. In this case the values of closestPoint and normal are undefined.

The normal will become unpredicable if the distance is a very small number.

See Also