Struct NavMeshGraphCorners3D
Converts a NavMeshGraph path into a list of corner points. Use this processor if your world has arbitrary curvature.
Implements
Namespace: AnyPath.Graphs.NavMesh
Assembly: AnyPath.dll
Syntax
public struct NavMeshGraphCorners3D : IPathProcessor<NavMeshGraphLocation, CornerAndNormal>
Remarks
The resulting path will be as straight as possible but will follow the exact curvature of the NavMesh. This means there can be multiple points that form a straight line.
Fields
shrinkRatio
Optional value between 0 and 1 tot allows for shrinking on the portals, keeping the path more towards the center of the triangles. In general, leave this value at zero, because it may result in less smooth paths if the portals don't touch each other anymore. This can be used to keep the agent from touching walls, but a better option would be to already have your navmesh defined in such a way that the triangles are far enough away from walls
Declaration
public float shrinkRatio
Field Value
| Type | Description |
|---|---|
| float |
weldThreshold
Weld corners that are below this distance together. This can prevent multiple corners at the same position where 3 or more triangles in the path intersect
Declaration
public float weldThreshold
Field Value
| Type | Description |
|---|---|
| float |
Properties
InsertQueryStart
Should the original query's starting node be inserted as the first node? In some cases, this can be helpful for processing and prevent an insert operation requiring every element to be shifted.
Declaration
public bool InsertQueryStart { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
ProcessPath(NavMeshGraphLocation, NavMeshGraphLocation, NativeList<NavMeshGraphLocation>, NativeList<CornerAndNormal>)
Process the raw path to another format.
Declaration
public void ProcessPath(NavMeshGraphLocation queryStart, NavMeshGraphLocation queryGoal, NativeList<NavMeshGraphLocation> path, NativeList<CornerAndNormal> appendTo)
Parameters
| Type | Name | Description |
|---|---|---|
| NavMeshGraphLocation | queryStart | The original start node that was used for the query. This can be used to derive an exact location in the processed path. |
| NavMeshGraphLocation | queryGoal | The original goal node that was used for the query. This can be used to derive an exact location in the processed path. |
| NativeList<NavMeshGraphLocation> | path | |
| NativeList<CornerAndNormal> | appendTo |