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

Returns a random point within reach of the specified location.

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 GetRandomPoint(
	NavmeshPoint start,
	float radius,
	NavmeshQueryFilter filter,
	out NavmeshPoint randomPoint
)
Public Function GetRandomPoint ( _
	start As NavmeshPoint, _
	radius As Single, _
	filter As NavmeshQueryFilter, _
	<OutAttribute> ByRef randomPoint As NavmeshPoint _
) As NavStatus
public:
NavStatus GetRandomPoint(
	NavmeshPoint start, 
	float radius, 
	NavmeshQueryFilter^ filter, 
	[OutAttribute] NavmeshPoint% randomPoint
)

Parameters

start
NavmeshPoint
The point to search from.
radius
Single
The polygon overlap radius.
filter
NavmeshQueryFilter
The filter to apply to the query.
randomPoint
NavmeshPoint%
A random point within reach of the specified location.

Return Value

The NavStatus flags for the query.

Remarks

The result point is constrainted to the polygons overlapped by the circle, not the circle itself. The overlap test follows the same rules as the FindPolys method.

The search speed is linear to the number of polygons.

See Also