Class RecastNavigationMesh
- Namespace
- Stride.Navigation.Processors
- Assembly
- Stride.Navigation.dll
Recast native navigation mesh wrapper
public class RecastNavigationMesh : IDisposable
- Inheritance
-
RecastNavigationMesh
- Implements
- Extension Methods
Constructors
RecastNavigationMesh(NavigationMesh)
public RecastNavigationMesh(NavigationMesh navigationMesh)
Parameters
navigationMeshNavigationMesh
Methods
AddOrReplaceTile(byte[])
Adds or replaces a tile in the navigation mesh
public bool AddOrReplaceTile(byte[] data)
Parameters
databyte[]
Returns
Remarks
The coordinate of the tile is embedded inside the tile data header
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Raycast(Vector3, Vector3, NavigationQuerySettings)
Performs a raycast on the navigation mesh to perform line of sight or similar checks
public NavigationRaycastResult Raycast(Vector3 start, Vector3 end, NavigationQuerySettings querySettings)
Parameters
startVector3Starting point
endVector3Ending point
querySettingsNavigationQuerySettingsAdvanced settings to be provided to the navigation mesh query
Returns
- NavigationRaycastResult
The found raycast hit if Hit is true
RemoveTile(Point)
Removes a tile at given coordinate
public bool RemoveTile(Point coord)
Parameters
coordPointThe tile coordinate
Returns
TryFindPath(Vector3, Vector3, ICollection<Vector3>, NavigationQuerySettings)
Finds a path from point to
public bool TryFindPath(Vector3 start, Vector3 end, ICollection<Vector3> path, NavigationQuerySettings querySettings)
Parameters
startVector3The starting location of the pathfinding query
endVector3The ending location of the pathfinding query
pathICollection<Vector3>The waypoints for the found path, if any (at least 2 if a path was found)
querySettingsNavigationQuerySettingsAdvanced settings to be provided to the navigation mesh query
Returns
- bool
The found path points or null