NavigationPathQueryParameters3D
Provides parameters for 3D navigation path queries.
Provides parameters for 3D navigation path queries.
By changing various properties of this object, such as the start and target position, you can configure path queries to the NavigationServer3D.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
NavigationPathQueryParameters3DConstructor
public NavigationPathQueryParameters3D();Properties15
ExcludedRegionsProperty
public Reckfell.Collections.Array<Rid> ExcludedRegions { get; set; }The list of region Rids that will be excluded from the path query. Use NavigationRegion3D.GetRid to get the Rid associated with a NavigationRegion3D node.
Note: The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then set it to the property again.
IncludedRegionsProperty
public Reckfell.Collections.Array<Rid> IncludedRegions { get; set; }The list of region Rids that will be included by the path query. Use NavigationRegion3D.GetRid to get the Rid associated with a NavigationRegion3D node. If left empty all regions are included. If a region ends up being both included and excluded at the same time it will be excluded.
Note: The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then set it to the property again.
MetadataFlagsProperty
public NavigationPathQueryParameters3D.PathMetadataFlags MetadataFlags { get; set; }Additional information to include with the navigation path.
NavigationLayersProperty
public uint NavigationLayers { get; set; }The navigation layers the query will use (as a bitmask).
PathPostprocessingProperty
public NavigationPathQueryParameters3D.PathPostProcessing PathPostprocessing { get; set; }The path postprocessing applied to the raw path corridor found by the NavigationPathQueryParameters3D.PathfindingAlgorithm.
PathReturnMaxLengthProperty
public float PathReturnMaxLength { get; set; }The maximum allowed length of the returned path in world units. A path will be clipped when going over this length. A value of 0 or below counts as disabled.
PathReturnMaxRadiusProperty
public float PathReturnMaxRadius { get; set; }The maximum allowed radius in world units that the returned path can be from the path start. The path will be clipped when going over this radius. A value of 0 or below counts as disabled.
Note: This will perform a sphere shaped clip operation on the path with the first path position being the sphere's center position.
PathSearchMaxDistanceProperty
public float PathSearchMaxDistance { get; set; }The maximum distance a searched polygon can be away from the start polygon before the pathfinding cancels the search for a path to the (possibly unreachable or very far away) target position polygon. In this case the pathfinding resets and builds a path from the start polygon to the polygon that was found closest to the target position so far. A value of 0 or below counts as unlimited. In case of unlimited the pathfinding will search all polygons connected with the start polygon until either the target position polygon is found or all available polygon search options are exhausted.
PathSearchMaxPolygonsProperty
public int PathSearchMaxPolygons { get; set; }The maximum number of polygons that are searched before the pathfinding cancels the search for a path to the (possibly unreachable or very far away) target position polygon. In this case the pathfinding resets and builds a path from the start polygon to the polygon that was found closest to the target position so far. A value of 0 or below counts as unlimited. In case of unlimited the pathfinding will search all polygons connected with the start polygon until either the target position polygon is found or all available polygon search options are exhausted.
PathfindingAlgorithmProperty
public NavigationPathQueryParameters3D.PathfindingAlgorithmEnum PathfindingAlgorithm { get; set; }The pathfinding algorithm used in the path query.
SimplifyEpsilonProperty
public float SimplifyEpsilon { get; set; }The path simplification amount in world units.
SimplifyPathProperty
public bool SimplifyPath { get; set; }If true a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by NavigationPathQueryParameters3D.SimplifyEpsilon. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation.
Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields".
StartPositionProperty
public Vector3 StartPosition { get; set; }The pathfinding start position in global coordinates.
TargetPositionProperty
public Vector3 TargetPosition { get; set; }The pathfinding target position in global coordinates.
Methods30
GetExcludedRegionsReckfell.Collections.Array<Rid>
public Reckfell.Collections.Array<Rid> GetExcludedRegions();Reckfell.Collections.Array<Rid>GetIncludedRegionsReckfell.Collections.Array<Rid>
public Reckfell.Collections.Array<Rid> GetIncludedRegions();Reckfell.Collections.Array<Rid>GetMapRid
public Rid GetMap();RidGetMetadataFlagsNavigationPathQueryParameters3D.PathMetadataFlags
public NavigationPathQueryParameters3D.PathMetadataFlags GetMetadataFlags();NavigationPathQueryParameters3D.PathMetadataFlagsGetNavigationLayersuint
public uint GetNavigationLayers();uintGetPathPostprocessingNavigationPathQueryParameters3D.PathPostProcessing
public NavigationPathQueryParameters3D.PathPostProcessing GetPathPostprocessing();NavigationPathQueryParameters3D.PathPostProcessingGetPathReturnMaxLengthfloat
public float GetPathReturnMaxLength();floatGetPathReturnMaxRadiusfloat
public float GetPathReturnMaxRadius();floatGetPathSearchMaxDistancefloat
public float GetPathSearchMaxDistance();floatGetPathSearchMaxPolygonsint
public int GetPathSearchMaxPolygons();intGetPathfindingAlgorithmNavigationPathQueryParameters3D.PathfindingAlgorithmEnum
public NavigationPathQueryParameters3D.PathfindingAlgorithmEnum GetPathfindingAlgorithm();NavigationPathQueryParameters3D.PathfindingAlgorithmEnumGetSimplifyEpsilonfloat
public float GetSimplifyEpsilon();floatGetSimplifyPathbool
public bool GetSimplifyPath();boolGetStartPositionVector3
public Vector3 GetStartPosition();Vector3GetTargetPositionVector3
public Vector3 GetTargetPosition();Vector3SetExcludedRegionsvoid
public void SetExcludedRegions(Reckfell.Collections.Array<Rid> regions);| Name | Type | Default |
|---|---|---|
regions | Reckfell.Collections.Array<Rid> | — |
SetIncludedRegionsvoid
public void SetIncludedRegions(Reckfell.Collections.Array<Rid> regions);| Name | Type | Default |
|---|---|---|
regions | Reckfell.Collections.Array<Rid> | — |
SetMapvoid
public void SetMap(Rid map);| Name | Type | Default |
|---|---|---|
map | Rid | — |
SetMetadataFlagsvoid
public void SetMetadataFlags(NavigationPathQueryParameters3D.PathMetadataFlags flags);| Name | Type | Default |
|---|---|---|
flags | NavigationPathQueryParameters3D.PathMetadataFlags | — |
SetNavigationLayersvoid
public void SetNavigationLayers(uint navigationLayers);| Name | Type | Default |
|---|---|---|
navigationLayers | uint | — |
SetPathPostprocessingvoid
public void SetPathPostprocessing(NavigationPathQueryParameters3D.PathPostProcessing pathPostprocessing);| Name | Type | Default |
|---|---|---|
pathPostprocessing | NavigationPathQueryParameters3D.PathPostProcessing | — |
SetPathReturnMaxLengthvoid
public void SetPathReturnMaxLength(float length);| Name | Type | Default |
|---|---|---|
length | float | — |
SetPathReturnMaxRadiusvoid
public void SetPathReturnMaxRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
SetPathSearchMaxDistancevoid
public void SetPathSearchMaxDistance(float distance);| Name | Type | Default |
|---|---|---|
distance | float | — |
SetPathSearchMaxPolygonsvoid
public void SetPathSearchMaxPolygons(int maxPolygons);| Name | Type | Default |
|---|---|---|
maxPolygons | int | — |
SetPathfindingAlgorithmvoid
public void SetPathfindingAlgorithm(NavigationPathQueryParameters3D.PathfindingAlgorithmEnum pathfindingAlgorithm);| Name | Type | Default |
|---|---|---|
pathfindingAlgorithm | NavigationPathQueryParameters3D.PathfindingAlgorithmEnum | — |
SetSimplifyEpsilonvoid
public void SetSimplifyEpsilon(float epsilon);| Name | Type | Default |
|---|---|---|
epsilon | float | — |
SetSimplifyPathvoid
public void SetSimplifyPath(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetStartPositionvoid
public void SetStartPosition(Vector3 startPosition);| Name | Type | Default |
|---|---|---|
startPosition | Vector3 | — |
SetTargetPositionvoid
public void SetTargetPosition(Vector3 targetPosition);| Name | Type | Default |
|---|---|---|
targetPosition | Vector3 | — |
NavigationPathQueryParameters3D.PathMetadataFlags
| Value | Description |
|---|---|
All = 7 | Include all available metadata about the returned path. |
None = 0 | Don't include any additional metadata about the returned path. |
Owners = 4 | Include the |
Rids = 2 | Include the |
Types = 1 | Include the type of navigation primitive (region or link) that each point of the path goes through. |
NavigationPathQueryParameters3D.PathPostProcessing
| Value | Description |
|---|---|
Corridorfunnel = 0 | Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. |
Edgecentered = 1 | Centers every position in the middle of the traveled navigation mesh's polygon edge. This creates better paths for tile- or grid-based layouts that restrict the movement to the cells' centers. |
None = 2 | Applies no postprocessing and returns the raw path corridor as found by the pathfinding algorithm. |
NavigationPathQueryParameters3D.PathfindingAlgorithmEnum
| Value | Description |
|---|---|
Astar = 0 | The path query uses the default A* pathfinding algorithm. |