[This is preliminary documentation and is subject to change.]
Assembly: cai-nav (in cai-nav.dll) Version: 0.4.0.0 (0.4.0.0)
|C#||Visual Basic||Visual C++|
A point within the start polygon. (In) (Out if the polygon reference is zero.)
A point within the end polygon. (In) (Out if the polygon reference is zero.)
The search extents to use if the start or end point polygon reference is zero.
The filter to apply to the query.
An ordered list of polygon references in the path. (Start to end.) (Out) [(polyRef) * pathCount]
The number of polygons in the path.
Return ValueThe NavStatus flags for the query.
This method is useful if the polygon reference of either the start or end point is not known. If both points have a polygon reference of zero, then this method is equivalent to the following:
- Using GetNearestPoint(UInt32, Vector3, Vector3%) with the start point to get the start polygon.
- Using GetNearestPoint(UInt32, Vector3, Vector3%) with the end point to get the end polygon.
- Calling the normal find path using the two new start and end points.
A point search will only be performed for points with a polygon reference of zero. If a point search is required, the point and its polygon reference parameter become output parameters and the point will be snapped to the navigation mesh.
This method may return a partial result, even if there is a failure. If there is no failure, it will at least perform the required point searches. If the point searches succeed, then the find path operation will be performed.
Checking the return results:
- If the pathCount is greater than zero, then the path and all required point searches succeeded.
- If the overall operation failed, but a point with an input polygon reference of zero has an output polygon reference that is non-zero, then that point's search succeeded.
For the path results:
If the end polygon cannot be reached, then the last polygon is the nearest one found to the end polygon.
If the path buffer is to small to hold the result, it will be filled as far as possible from the start polygon toward the end polygon.
The start and end points are used to calculate traversal costs. (y-values matter.)