Struct NavMeshGraphUnroller
Processes a NavMeshGraph path for use with realtime steering using GetSteerTargetPosition<T>(T, float3, ref int)
Implements
Namespace: AnyPath.Graphs.NavMesh
Assembly: AnyPath.dll
Syntax
public struct NavMeshGraphUnroller : IPathProcessor<NavMeshGraphLocation, UnrolledNavMeshGraphPortal>
Remarks
The raw path of NavMeshGraphLocation is converted into a path of UnrolledNavMeshGraphPortal. This path can be fed into GetSteerTargetPosition<T>(T, float3, ref int) to obtain real time steering information, even if your agent is not exactly on the path.
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<UnrolledNavMeshGraphPortal>)
Process the raw path to another format.
Declaration
public void ProcessPath(NavMeshGraphLocation queryStart, NavMeshGraphLocation queryGoal, NativeList<NavMeshGraphLocation> path, NativeList<UnrolledNavMeshGraphPortal> 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<UnrolledNavMeshGraphPortal> | appendTo |