RecastNavigationMesh Class
Namespace: Stride.Navigation.ProcessorsAssembly: Stride.Navigation.dll
Recast native navigation mesh wrapper
public class RecastNavigationMesh : IDisposable
Name | Description | |
---|---|---|
Constructors | ||
RecastNavigationMesh(NavigationMesh) | ||
Methods | ||
AddOrReplaceTile(Byte[]) | Adds or replaces a tile in the navigation mesh |
|
Dispose() | ||
Raycast(Vector3, Vector3, NavigationQuerySettings) | Performs a raycast on the navigation mesh to perform line of sight or similar checks |
|
RemoveTile(Point) | Removes a tile at given coordinate |
|
TryFindPath(Vector3, Vector3, ICollection<Vector3>, NavigationQuerySettings) | Finds a path from point to |
Constructors
RecastNavigationMesh(NavigationMesh)
public RecastNavigationMesh(NavigationMesh navigationMesh)
Parameters
Type | Name | Description |
---|---|---|
NavigationMesh | navigationMesh |
Methods
AddOrReplaceTile(Byte[])
Adds or replaces a tile in the navigation mesh
public bool AddOrReplaceTile(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
The coordinate of the tile is embedded inside the tile data header
Dispose()
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
Type | Name | Description |
---|---|---|
Vector3 | start | Starting point |
Vector3 | end | Ending point |
NavigationQuerySettings | querySettings | Advanced settings to be provided to the navigation mesh query |
Returns
Type | Description |
---|---|
NavigationRaycastResult | The found raycast hit if Hit is true |
RemoveTile(Point)
Removes a tile at given coordinate
public bool RemoveTile(Point coord)
Parameters
Type | Name | Description |
---|---|---|
Point | coord | The tile coordinate |
Returns
Type | Description |
---|---|
System.Boolean |
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
Type | Name | Description |
---|---|---|
Vector3 | start | The starting location of the pathfinding query |
Vector3 | end | The ending location of the pathfinding query |
System.Collections.Generic.ICollection<Vector3> | path | The waypoints for the found path, if any (at least 2 if a path was found) |
NavigationQuerySettings | querySettings | Advanced settings to be provided to the navigation mesh query |
Returns
Type | Description |
---|---|
System.Boolean | The found path points or null |