Interface ICrowd
Hierarchy
- ICrowd
Implemented by
Index
Methods
- add
Agent - agent
Goto - agent
Teleport - dispose
- get
Agent Next Target Path - get
Agent Next Target Path ToRef - get
Agent Position - get
Agent Position ToRef - get
Agent State - get
Agent Velocity - get
Agent Velocity ToRef - get
Agents - get
Default Query Extent - get
Default Query Extent ToRef - over
Offmesh Connection - remove
Agent - set
Default Query Extent - update
- update
Agent Parameters
Methods
add AgentSearch playground for addAgent
-
Add a new agent to the crowd with the specified parameter a corresponding transformNode. You can attach anything to that node. The node position is updated in the scene update tick.
Parameters
-
pos: Vector3
world position that will be constrained by the navigation mesh
-
parameters: IAgentParameters
agent parameters
-
transform: TransformNode
hooked to the agent that will be update by the scene
Returns number
agent index
-
agent GotoSearch playground for agentGoto
-
Asks a particular agent to go to a destination. That destination is constrained by the navigation mesh
Parameters
-
index: number
agent index returned by addAgent
-
destination: Vector3
targeted world position
Returns void
-
agent TeleportSearch playground for agentTeleport
-
Teleport the agent to a new position
Parameters
-
index: number
agent index returned by addAgent
-
destination: Vector3
targeted world position
Returns void
-
disposeSearch playground for dispose
-
Release all resources
Returns void
get Agent Next Target PathSearch playground for getAgentNextTargetPath
-
Gets the agent next target point on the path
Parameters
-
index: number
agent index returned by addAgent
Returns Vector3
world space position
-
get Agent Next Target Path ToRefSearch playground for getAgentNextTargetPathToRef
-
Gets the agent next target point on the path
Parameters
-
index: number
agent index returned by addAgent
-
result: Vector3
output world space position
Returns void
-
get Agent PositionSearch playground for getAgentPosition
-
Returns the agent position in world space
Parameters
-
index: number
agent index returned by addAgent
Returns Vector3
world space position
-
get Agent Position ToRefSearch playground for getAgentPositionToRef
-
Gets the agent position result in world space
Parameters
-
index: number
agent index returned by addAgent
-
result: Vector3
output world space position
Returns void
-
get Agent StateSearch playground for getAgentState
-
Gets the agent state
Parameters
-
index: number
agent index returned by addAgent
Returns number
agent state
-
get Agent VelocitySearch playground for getAgentVelocity
-
Gets the agent velocity in world space
Parameters
-
index: number
agent index returned by addAgent
Returns Vector3
world space velocity
-
get Agent Velocity ToRefSearch playground for getAgentVelocityToRef
-
Gets the agent velocity result in world space
Parameters
-
index: number
agent index returned by addAgent
-
result: Vector3
output world space velocity
Returns void
-
get AgentsSearch playground for getAgents
-
get the list of all agents attached to this crowd
Returns number[]
list of agent indices
get Default Query ExtentSearch playground for getDefaultQueryExtent
-
Get the Bounding box extent specified by setDefaultQueryExtent
Returns Vector3
the box extent values
get Default Query Extent ToRefSearch playground for getDefaultQueryExtentToRef
-
Get the Bounding box extent result specified by setDefaultQueryExtent
Parameters
-
result: Vector3
output the box extent values
Returns void
-
over Offmesh ConnectionSearch playground for overOffmeshConnection
-
returns true if the agent in over an off mesh link connection
Parameters
-
index: number
agent index returned by addAgent
Returns boolean
true if over an off mesh link connection
-
remove AgentSearch playground for removeAgent
-
remove a particular agent previously created
Parameters
-
index: number
agent index returned by addAgent
Returns void
-
set Default Query ExtentSearch playground for setDefaultQueryExtent
-
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
-
updateSearch playground for update
-
Tick update done by the Scene. Agent position/velocity/acceleration is updated by this function
Parameters
-
deltaTime: number
in seconds
Returns void
-
update Agent ParametersSearch playground for updateAgentParameters
-
Update agent parameters
Parameters
-
index: number
agent index returned by addAgent
-
parameters: IAgentParameters
agent parameters
Returns void
-
Crowd Interface. A Crowd is a collection of moving agents constrained by a navigation mesh