reckfellENGINE

NavigationPathQueryParameters2D

Provides parameters for 2D navigation path queries.

On this page
class NavigationPathQueryParameters2DReckfellSharpInherits RefCounted

Provides parameters for 2D navigation path queries.

By changing various properties of this object, such as the start and target position, you can configure path queries to the NavigationServer2D.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

NavigationPathQueryParameters2DConstructor
# NavigationPathQueryParameters2D
C#
public NavigationPathQueryParameters2D();

Properties15

ExcludedRegionsProperty
# ExcludedRegions
C#
public Reckfell.Collections.Array<Rid> ExcludedRegions { get; set; }

Region RIDs omitted from the query. A region that is both included and excluded is not used. The filter remains in the parameters object until changed or cleared.

IncludedRegionsProperty
# IncludedRegions
C#
public Reckfell.Collections.Array<Rid> IncludedRegions { get; set; }

A nonempty list admits only listed regions; ExcludedRegions takes precedence. Installed 1.0.0 limitation: such a list blocks the tested NavigationLink route even with both connected regions included. For that case, leave it empty and verify layer-based access restrictions.

MapProperty
# Map
C#
public Rid Map { get; set; }

RID of the live navigation map to query. A new map must be published by the server before querying; a nonzero iteration ID does not guarantee that the latest changes have synchronized. Do not use a freed RID.

MetadataFlagsProperty
# MetadataFlags
C#
public NavigationPathQueryParameters2D.PathMetadataFlags MetadataFlags { get; set; }

Selects point metadata: types, RIDs and owner IDs. Defaults to All; None disables collection. Read the corresponding array only when its flag is enabled; a checked repeated query with None clears previous metadata arrays.

NavigationLayersProperty
# NavigationLayers
C#
public uint NavigationLayers { get; set; }

Unsigned 32-bit mask of allowed navigation layers. Layer N is bit 1u << (N - 1), for N from 1 to 32. A region is eligible when masks overlap; zero admits no region. Does not define physics collisions or agent clearance.

PathPostprocessingProperty
# PathPostprocessing
C#
public NavigationPathQueryParameters2D.PathPostProcessing PathPostprocessing { get; set; }

Processes the found corridor: Corridorfunnel shortens the path within it, Edgecentered uses crossed-edge centers, and None leaves the raw variant. Does not select another globally shortest corridor.

PathReturnMaxLengthProperty
# PathReturnMaxLength
C#
public float PathReturnMaxLength { get; set; }

Clips the returned path to this length after searching; zero disables the limit. A clipped path may not reach the target. Limits output rather than the search budget.

PathReturnMaxRadiusProperty
# PathReturnMaxRadius
C#
public float PathReturnMaxRadius { get; set; }

Clips output by a radius around the start; zero disables the limit. The endpoint can intentionally remain short of the target. Does not replace a path-length limit along turns.

PathSearchMaxDistanceProperty
# PathSearchMaxDistance
C#
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
# PathSearchMaxPolygons
C#
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
# PathfindingAlgorithm
C#
public NavigationPathQueryParameters2D.PathfindingAlgorithmEnum PathfindingAlgorithm { get; set; }

The pathfinding algorithm used in the path query.

SimplifyEpsilonProperty
# SimplifyEpsilon
C#
public float SimplifyEpsilon { get; set; }

Simplification tolerance when SimplifyPath is enabled, in map coordinate units. It is not the acceptable distance to a gameplay target.

SimplifyPathProperty
# SimplifyPath
C#
public bool SimplifyPath { get; set; }

Enables additional path simplification using SimplifyEpsilon. Check removed points on your geometry; preserving endpoints in a simple fixture does not establish quality on a complex level.

StartPositionProperty
# StartPosition
C#
public Vector2 StartPosition { get; set; }

Start in navigation-map global coordinates. The query may project it onto an allowed polygon: check the first returned point when the requested start must be preserved.

TargetPositionProperty
# TargetPosition
C#
public Vector2 TargetPosition { get; set; }

Target in map-global coordinates. A nonempty result may end at an accessible boundary instead of the target; compare its last point against the target using your game tolerance.

Methods30

GetExcludedRegionsReckfell.Collections.Array<Rid>
# GetExcludedRegions
C#
public Reckfell.Collections.Array<Rid> GetExcludedRegions();
Returns Reckfell.Collections.Array<Rid>
GetIncludedRegionsReckfell.Collections.Array<Rid>
# GetIncludedRegions
C#
public Reckfell.Collections.Array<Rid> GetIncludedRegions();
Returns Reckfell.Collections.Array<Rid>
GetMapRid
# GetMap
C#
public Rid GetMap();
Returns Rid
GetMetadataFlagsNavigationPathQueryParameters2D.PathMetadataFlags
# GetMetadataFlags
C#
public NavigationPathQueryParameters2D.PathMetadataFlags GetMetadataFlags();
Returns NavigationPathQueryParameters2D.PathMetadataFlags
GetNavigationLayersuint
# GetNavigationLayers
C#
public uint GetNavigationLayers();
Returns uint
GetPathPostprocessingNavigationPathQueryParameters2D.PathPostProcessing
# GetPathPostprocessing
C#
public NavigationPathQueryParameters2D.PathPostProcessing GetPathPostprocessing();
Returns NavigationPathQueryParameters2D.PathPostProcessing
GetPathReturnMaxLengthfloat
# GetPathReturnMaxLength
C#
public float GetPathReturnMaxLength();
Returns float
GetPathReturnMaxRadiusfloat
# GetPathReturnMaxRadius
C#
public float GetPathReturnMaxRadius();
Returns float
GetPathSearchMaxDistancefloat
# GetPathSearchMaxDistance
C#
public float GetPathSearchMaxDistance();
Returns float
GetPathSearchMaxPolygonsint
# GetPathSearchMaxPolygons
C#
public int GetPathSearchMaxPolygons();
Returns int
GetPathfindingAlgorithmNavigationPathQueryParameters2D.PathfindingAlgorithmEnum
# GetPathfindingAlgorithm
C#
public NavigationPathQueryParameters2D.PathfindingAlgorithmEnum GetPathfindingAlgorithm();
Returns NavigationPathQueryParameters2D.PathfindingAlgorithmEnum
GetSimplifyEpsilonfloat
# GetSimplifyEpsilon
C#
public float GetSimplifyEpsilon();
Returns float
GetSimplifyPathbool
# GetSimplifyPath
C#
public bool GetSimplifyPath();
Returns bool
GetStartPositionVector2
# GetStartPosition
C#
public Vector2 GetStartPosition();
Returns Vector2
GetTargetPositionVector2
# GetTargetPosition
C#
public Vector2 GetTargetPosition();
Returns Vector2
SetExcludedRegionsvoid
# SetExcludedRegions
C#
public void SetExcludedRegions(Reckfell.Collections.Array<Rid> regions);
Parameters
NameTypeDefault
regionsReckfell.Collections.Array<Rid>—
SetIncludedRegionsvoid
# SetIncludedRegions
C#
public void SetIncludedRegions(Reckfell.Collections.Array<Rid> regions);
Parameters
NameTypeDefault
regionsReckfell.Collections.Array<Rid>—
SetMapvoid
# SetMap
C#
public void SetMap(Rid map);
Parameters
NameTypeDefault
mapRid—
SetMetadataFlagsvoid
# SetMetadataFlags
C#
public void SetMetadataFlags(NavigationPathQueryParameters2D.PathMetadataFlags flags);
Parameters
NameTypeDefault
flagsNavigationPathQueryParameters2D.PathMetadataFlags—
SetNavigationLayersvoid
# SetNavigationLayers
C#
public void SetNavigationLayers(uint navigationLayers);
Parameters
NameTypeDefault
navigationLayersuint—
SetPathPostprocessingvoid
# SetPathPostprocessing
C#
public void SetPathPostprocessing(NavigationPathQueryParameters2D.PathPostProcessing pathPostprocessing);
Parameters
NameTypeDefault
pathPostprocessingNavigationPathQueryParameters2D.PathPostProcessing—
SetPathReturnMaxLengthvoid
# SetPathReturnMaxLength
C#
public void SetPathReturnMaxLength(float length);
Parameters
NameTypeDefault
lengthfloat—
SetPathReturnMaxRadiusvoid
# SetPathReturnMaxRadius
C#
public void SetPathReturnMaxRadius(float radius);
Parameters
NameTypeDefault
radiusfloat—
SetPathSearchMaxDistancevoid
# SetPathSearchMaxDistance
C#
public void SetPathSearchMaxDistance(float distance);
Parameters
NameTypeDefault
distancefloat—
SetPathSearchMaxPolygonsvoid
# SetPathSearchMaxPolygons
C#
public void SetPathSearchMaxPolygons(int maxPolygons);
Parameters
NameTypeDefault
maxPolygonsint—
SetPathfindingAlgorithmvoid
# SetPathfindingAlgorithm
C#
public void SetPathfindingAlgorithm(NavigationPathQueryParameters2D.PathfindingAlgorithmEnum pathfindingAlgorithm);
Parameters
NameTypeDefault
pathfindingAlgorithmNavigationPathQueryParameters2D.PathfindingAlgorithmEnum—
SetSimplifyEpsilonvoid
# SetSimplifyEpsilon
C#
public void SetSimplifyEpsilon(float epsilon);
Parameters
NameTypeDefault
epsilonfloat—
SetSimplifyPathvoid
# SetSimplifyPath
C#
public void SetSimplifyPath(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetStartPositionvoid
# SetStartPosition
C#
public void SetStartPosition(Vector2 startPosition);
Parameters
NameTypeDefault
startPositionVector2—
SetTargetPositionvoid
# SetTargetPosition
C#
public void SetTargetPosition(Vector2 targetPosition);
Parameters
NameTypeDefault
targetPositionVector2—

NavigationPathQueryParameters2D.PathMetadataFlags

ValueDescription
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 ObjectIDs of the ReckfellObjects which manage the regions and links each point of the path goes through.

Rids = 2

Include the Rids of the regions and links that each point of the path goes through.

Types = 1

Include the type of navigation primitive (region or link) that each point of the path goes through.

NavigationPathQueryParameters2D.PathPostProcessing

ValueDescription
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.

NavigationPathQueryParameters2D.PathfindingAlgorithmEnum

ValueDescription
Astar = 0

The path query uses the default A* pathfinding algorithm.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.