Implements

Constructors

  • Parameters

    • crowd: Crowd
    • agentIndex: number

    Returns CrowdAgent

Properties

agentIndex: number
crowd: Crowd
interpolatedPosition: Vector3

The interpolated position of the agent.

Use this if stepping the crowd with interpolation. This will not be updated if stepping the crowd without interpolation.

Accessors

  • get collisionQueryRange(): number
  • Returns number

  • set collisionQueryRange(value): void
  • Parameters

    • value: number

    Returns void

  • get height(): number
  • Returns number

  • set height(value): void
  • Parameters

    • value: number

    Returns void

  • get maxAcceleration(): number
  • Returns number

  • set maxAcceleration(value): void
  • Parameters

    • value: number

    Returns void

  • get maxSpeed(): number
  • Returns number

  • set maxSpeed(value): void
  • Parameters

    • value: number

    Returns void

  • get obstacleAvoidanceType(): number
  • Returns number

  • set obstacleAvoidanceType(value): void
  • Parameters

    • value: number

    Returns void

  • get pathOptimizationRange(): number
  • Returns number

  • set pathOptimizationRange(value): void
  • Parameters

    • value: number

    Returns void

  • get queryFilterType(): number
  • Returns number

  • set queryFilterType(value): void
  • Parameters

    • value: number

    Returns void

  • get radius(): number
  • Returns number

  • set radius(value): void
  • Parameters

    • value: number

    Returns void

  • get separationWeight(): number
  • Returns number

  • set separationWeight(value): void
  • Parameters

    • value: number

    Returns void

  • get updateFlags(): number
  • Returns number

  • set updateFlags(value): void
  • Parameters

    • value: number

    Returns void

  • get userData(): unknown
  • Returns unknown

  • set userData(value): void
  • Parameters

    • value: unknown

    Returns void

Methods

  • Returns the local path corridor corners for the agent

    Returns Vector3[]

  • The desired velocity of the agent. Based on the current path, calculated from scratch each frame.

    Returns Vector3

  • The desired velocity adjusted by obstacle avoidance, calculated from scratch each frame.

    Returns Vector3

  • Returns the next target position on the path to the target

    Returns Vector3

  • Returns whether the agent is over an off-mesh connection.

    Returns boolean

  • The position of the agent.

    Returns Vector3

  • Updates the agent's target.

    Parameters

    • position: Vector3

      The new target position.

    Returns boolean

    True if the request was successful.

  • Submits a new move request for the specified agent.

    Parameters

    • velocity: Vector3

      The desired velocity of the agent.

    Returns boolean

    True if the request was successful.

  • Resets the current move request for the specified agent.

    Returns void

  • Sets the agent's parameters. Any parameters not specified in the crowdAgentParams object will be set to their default values.

    Parameters

    Returns void

  • Returns the state of the agent.

    0 = DT_CROWDAGENT_STATE_INVALID 1 = DT_CROWDAGENT_STATE_WALKING 2 = DT_CROWDAGENT_STATE_OFFMESH

    Returns number

  • Returns the next target position on the path to the target

    Returns Vector3

  • Teleports the agent to the specified position.

    Parameters

    Returns void

  • Updates the agent's parameters. Any parameters not specified in the crowdAgentParams object will be unchanged.

    Parameters

    Returns void

  • The actual velocity of the agent. The change from velocityDesiredObstacleAdjusted -> velocity is constrained by max acceleration.

    Returns Vector3