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
navigationMesh
NavigationMesh
Methods
AddOrReplaceTile(byte[])
Adds or replaces a tile in the navigation mesh
public bool AddOrReplaceTile(byte[] data)
Parameters
data
byte[]
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
start
Vector3Starting point
end
Vector3Ending point
querySettings
NavigationQuerySettingsAdvanced 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
coord
PointThe 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
start
Vector3The starting location of the pathfinding query
end
Vector3The ending location of the pathfinding query
path
ICollection<Vector3>The waypoints for the found path, if any (at least 2 if a path was found)
querySettings
NavigationQuerySettingsAdvanced settings to be provided to the navigation mesh query
Returns
- bool
The found path points or null