Options
All
  • Public
  • Public/Protected
  • All
Menu

Navigation plugin interface to add navigation constrained by a navigation mesh

Hierarchy

  • INavigationEnginePlugin

Implemented by

Index

Properties

name: string

plugin name

Methods

  • Creates an oriented box obstacle and add it to the navigation

    Parameters

    • position: Vector3

      world position

    • extent: Vector3

      box size

    • angle: number

      angle in radians of the box orientation on Y axis

    Returns IObstacle

    the obstacle freshly created

  • addCylinderObstacle(position: Vector3, radius: number, height: number): IObstacle
  • Creates a cylinder obstacle and add it to the navigation

    Parameters

    • position: Vector3

      world position

    • radius: number

      cylinder radius

    • height: number

      cylinder height

    Returns IObstacle

    the obstacle freshly created

  • buildFromNavmeshData(data: Uint8Array): void
  • build the navmesh from a previously saved state using getNavmeshData

    Parameters

    • data: Uint8Array

      the Uint8Array returned by getNavmeshData

    Returns void

  • 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(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

  • Create a navigation mesh debug mesh

    Parameters

    • scene: Scene

      is where the mesh will be added

    Returns Mesh

    debug display mesh

  • Creates a navigation mesh

    Parameters

    • meshes: Mesh[]

      array of all the geometry used to compute the navigation mesh

    • parameters: INavMeshParameters

      bunch of parameters used to filter geometry

    Returns void

  • dispose(): void
  • Release all resources

    Returns void

  • Get a navigation mesh constrained position, closest to the parameter position

    Parameters

    Returns Vector3

    the closest point to position constrained by the navigation mesh

  • Get a navigation mesh constrained position, closest to the parameter position

    Parameters

    • position: Vector3

      world position

    • result: Vector3

      output the closest point to position constrained by the navigation mesh

    Returns void

  • Get the Bounding box extent specified by setDefaultQueryExtent

    Returns Vector3

    the box extent values

  • getDefaultQueryExtentToRef(result: Vector3): void
  • Get the Bounding box extent result specified by setDefaultQueryExtent

    Parameters

    • result: Vector3

      output the box extent values

    Returns void

  • getMaximumSubStepCount(): number
  • Get the maximum number of iterations per navigation tick update

    Returns number

    the maximum number of iterations

  • getNavmeshData(): Uint8Array
  • returns the navmesh data that can be used later. The navmesh must be built before retrieving the data

    Returns Uint8Array

    data the Uint8Array that can be saved and reused

  • 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

  • getRandomPointAroundToRef(position: Vector3, maxRadius: number, result: Vector3): void
  • 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

    • result: Vector3

      output the closest point to position constrained by the navigation mesh

    Returns void

  • getTimeStep(): number
  • Get the time step of the navigation tick update.

    Returns number

    the current time step

  • isSupported(): boolean
  • If this plugin is supported

    Returns boolean

    true if plugin is supported

  • Compute the final position from a segment made of destination-position

    Parameters

    Returns Vector3

    the resulting point along the navmesh

  • Compute the final position from a segment made of destination-position

    Parameters

    • position: Vector3

      world position

    • destination: Vector3

      world position

    • result: Vector3

      output the resulting point along the navmesh

    Returns void

  • Removes an obstacle created by addCylinderObstacle or addBoxObstacle

    Parameters

    • obstacle: IObstacle

      obstacle to remove from the navigation

    Returns void

  • setDefaultQueryExtent(extent: Vector3): void
  • Set the Bounding box extent for doing spatial queries (getClosestPoint, getRandomPointAround, ...) The queries will try to find a solution within those bounds default is (1,1,1)

    Parameters

    • extent: Vector3

      x,y,z value that define the extent around the queries point of reference

    Returns void

  • setMaximumSubStepCount(newStepCount: number): void
  • If delta time in navigation tick update is greater than the time step a number of sub iterations are done. If more iterations are need to reach deltatime they will be discarded. A value of 0 will set to no maximum and update will use as many substeps as needed

    Parameters

    • newStepCount: number

      the maximum number of iterations

    Returns void

  • setTimeStep(newTimeStep: number): void
  • Set the time step of the navigation tick update. Default is 1/60. A value of 0 will disable fixed time update

    Parameters

    • newTimeStep: number

      the new timestep to apply to this world.

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme