INavigationEnginePlugin

Navigation plugin interface to add navigation constrained by a navigation mesh

Hierarchy

  • INavigationEnginePlugin

Implemented by

Index

Properties

name

Find examples in Playground
name: string

plugin name

Methods

computePath

Find examples in Playground
  • Compute a navigation path from start to end. Returns an empty array if no path can be computed

    Parameters

    Returns Vector3[]

    array containing world position composing the path

createCrowd

Find examples in Playground
  • createCrowd(maxAgents: number, maxAgentRadius: number, scene: Scene): ICrowd
  • Create a new Crowd so you can add agents

    Parameters

    • maxAgents: number

      the maximum agent count in the crowd

    • maxAgentRadius: number

      the maximum radius an agent can have

    • scene: Scene

      to attach the crowd to

    Returns ICrowd

    the crowd you can add agents to

createDebugNavMesh

Find examples in Playground
  • Create a navigation mesh debug mesh

    Parameters

    • scene: Scene

      is where the mesh will be added

    Returns Mesh

    debug display mesh

createMavMesh

Find examples in Playground
  • Creates a navigation mesh

    Parameters

    • meshes: Array<Mesh>

      array of all the geometry used to compute the navigatio mesh

    • parameters: INavMeshParameters

      bunch of parameters used to filter geometry

    Returns void

dispose

Find examples in Playground
  • dispose(): void
  • Release all resources

    Returns void

getClosestPoint

Find examples in Playground
  • Get a navigation mesh constrained position, closest to the parameter position

    Parameters

    Returns Vector3

    the closest point to position constrained by the navigation mesh

getRandomPointAround

Find examples in Playground
  • Get a navigation mesh constrained position, within a particular radius

    Parameters

    • position: Vector3

      world position

    • maxRadius: number

      the maximum distance to the constrained world position

    Returns Vector3

    the closest point to position constrained by the navigation mesh

isSupported

Find examples in Playground
  • isSupported(): boolean
  • If this plugin is supported

    Returns boolean

    true if plugin is supported

moveAlong

Find examples in Playground
  • Compute the final position from a segment made of destination-position

    Parameters

    • position: Vector3

      world position

    • destination: Vector3

      world position

    Returns Vector3

    the resulting point along the navmesh

Generated using TypeDoc