Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    RecastNavigationMesh Class

    Namespace: Stride.Navigation.Processors
    Assembly: Stride.Navigation.dll

    Recast native navigation mesh wrapper

    System.Object → RecastNavigationMesh
    Derived from RecastNavigationMesh:

    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

    | Improve this Doc View Source

    Constructors


    RecastNavigationMesh(NavigationMesh)

    public RecastNavigationMesh(NavigationMesh navigationMesh)
    Parameters
    Type Name Description
    NavigationMesh navigationMesh
    | Improve this Doc View Source

    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


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation