Struct NavMeshGraphCorners
Converts a NavMeshGraph path into a list of corner points. Use this processor if your world is mostly flat (in the XZ plane). Slopes are allowed but they should not exceed 90 degrees. If you have a curved world, use NavMeshGraphCorners3D.
Implements
Namespace: AnyPath.Graphs.NavMesh
Assembly: AnyPath.dll
Syntax
public struct NavMeshGraphCorners : IPathProcessor<NavMeshGraphLocation, float3>
Remarks
Note that the height will be reflected in the corner points, but there won't neccessarily be corner points at the start and end of slopes.
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 |
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<float3>)
Process the raw path to another format.
Declaration
public void ProcessPath(NavMeshGraphLocation queryStart, NavMeshGraphLocation queryGoal, NativeList<NavMeshGraphLocation> path, NativeList<float3> 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<float3> | appendTo |