Search Results for

    Show / Hide Table of Contents

    Class NavmeshMatrix

    NavmeshMatrix is a crucial component in your game, as it's the main object that creates a grid based on the solid and trigger colliders attached to its child objects.

    Inheritance
    object
    AxisMonoBehaviour
    AxisGameObject
    NavmeshMatrix
    Inherited Members
    AxisMonoBehaviour.ContainsLabel(string)
    AxisMonoBehaviour.CountChildrenWithLabel(string, bool)
    AxisMonoBehaviour.ContainsLabelInChildren(string, bool)
    AxisMonoBehaviour.GetSpaceBetweenColliders(AxisMonoBehaviour)
    AxisMonoBehaviour.GetSpaceBetweenCollidersHorizontally(AxisMonoBehaviour)
    AxisMonoBehaviour.PauseGame()
    AxisMonoBehaviour.SetActiveByName(string)
    AxisMonoBehaviour.ResumeGame()
    AxisMonoBehaviour.GameTimeScaleSet(float)
    AxisMonoBehaviour.transform
    AxisMonoBehaviour.gameObject
    AxisMonoBehaviour.collider
    AxisMonoBehaviour.Origin
    Namespace: Axis.Navigation
    Assembly: cs.temp.dll.dll
    Syntax
    public sealed class NavmeshMatrix : AxisGameObject

    Fields

    AllowDiagonals

    Allow pathfinding with diagonals

    Declaration
    public bool AllowDiagonals
    Field Value
    Type Description
    bool

    BlockColorGizmos

    Gizmos color for blocked tiles

    Declaration
    public UnityEngine.Color BlockColorGizmos
    Field Value
    Type Description
    UnityEngine.Color

    GridUpdateInterval

    Time interval for automatically update grid. Recommended lower values if blocking colliders, navzones or navlinks are moving fast and must be updated where they are. Doesn't account for NavObjects.

    Declaration
    public float GridUpdateInterval
    Field Value
    Type Description
    float

    Hexagon

    [Read-only] Wether grid is hexagon or square

    Declaration
    public bool Hexagon
    Field Value
    Type Description
    bool

    HorizontalGravity

    Declaration
    public Vector2 HorizontalGravity
    Field Value
    Type Description
    Vector2

    InifiniteBorder

    Allow border teleportation as inifinite plane

    Declaration
    public bool InifiniteBorder
    Field Value
    Type Description
    bool

    LinkColorGizmos

    Gizmos color for link tiles

    Declaration
    public UnityEngine.Color LinkColorGizmos
    Field Value
    Type Description
    UnityEngine.Color

    LogGizmosTime

    Declaration
    public bool LogGizmosTime
    Field Value
    Type Description
    bool

    LogUpdateTime

    Declaration
    public bool LogUpdateTime
    Field Value
    Type Description
    bool

    Matrixes

    Static list of active Matrixes available in the scene

    Declaration
    public static List<NavmeshMatrix> Matrixes
    Field Value
    Type Description
    System.Collections.Generic.List<T><NavmeshMatrix>

    MatrixMask

    [Read-only] LayerMask to filter colliders that affects this grid

    Declaration
    public LayerMask MatrixMask
    Field Value
    Type Description
    LayerMask

    MaxGridSquare

    Max number of rows and cols of the navmesh

    Declaration
    public int MaxGridSquare
    Field Value
    Type Description
    int

    MaxVerticalFloors

    Max number of vertical overlaping floors to be processed

    Declaration
    public int MaxVerticalFloors
    Field Value
    Type Description
    int

    OnObject

    Object containing events this NavmeshMatrix will dispatch when interacting with NavObjects

    Declaration
    public NavObjectEvents OnObject
    Field Value
    Type Description
    NavObjectEvents

    TileColorGizmos

    Gizmos color for default tiles

    Declaration
    public UnityEngine.Color TileColorGizmos
    Field Value
    Type Description
    UnityEngine.Color

    TileGizmos

    Declaration
    public bool TileGizmos
    Field Value
    Type Description
    bool

    TileRenderMaterial

    Main material to render tiles

    Declaration
    public Material TileRenderMaterial
    Field Value
    Type Description
    Material

    Methods

    Contains(Vector3)

    Check wether point is contained in this matrix bounds

    Declaration
    public bool Contains(Vector3 point)
    Parameters
    Type Name Description
    Vector3 point

    Coordinate to check

    Returns
    Type Description
    bool

    True if inside, false if outside

    GetMatrixAt(Bounds)

    Returns the first NavmeshMatrix to intersect bounds

    Declaration
    public static NavmeshMatrix GetMatrixAt(Bounds bounds)
    Parameters
    Type Name Description
    Bounds bounds

    Bounds to check

    Returns
    Type Description
    NavmeshMatrix

    The intersecting NavmeshMatrix

    GetMatrixAt(Vector3)

    Returns the closest NavmeshMatrix to a given point

    Declaration
    public static NavmeshMatrix GetMatrixAt(Vector3 point)
    Parameters
    Type Name Description
    Vector3 point

    Coordinate to check

    Returns
    Type Description
    NavmeshMatrix

    The closest NavmeshMatrix

    GetRandomStepPosition()

    Get random tile position

    Declaration
    public Vector3 GetRandomStepPosition()
    Returns
    Type Description
    Vector3

    Returns the random tile position

    NearestAvailableTile(Vector3, NavObject)

    Declaration
    public Tile NearestAvailableTile(Vector3 position, NavObject agent)
    Parameters
    Type Name Description
    Vector3 position
    NavObject agent
    Returns
    Type Description
    Tile

    NearestLinkTile(Vector3, float, NavLink)

    Get the nearest tile with a NavLink in it

    Declaration
    public Tile NearestLinkTile(Vector3 position, float maxDistance = 2, NavLink link = null)
    Parameters
    Type Name Description
    Vector3 position

    Coordinate to check

    float maxDistance

    Max distance to given coordinate

    NavLink link

    Check for specific NavLink presence

    Returns
    Type Description
    Tile

    The tile processed

    NearestTile(Vector3, float)

    Declaration
    public Tile NearestTile(Vector3 position, float maxDistance = 2)
    Parameters
    Type Name Description
    Vector3 position
    float maxDistance
    Returns
    Type Description
    Tile

    OnTransformChildrenChanged()

    Declaration
    protected override void OnTransformChildrenChanged()
    Overrides
    AxisMonoBehaviour.OnTransformChildrenChanged()
    In This Article
    Back to top Axis 1.0.0