Agent Class
The agents that live in the simulation engine.
Constructor
Item Index
Methods
_startPath
()
Helper to set the path start that takes into account inverse paths.
destroy
()
Destroy agent.
followPath
(
-
path
-
index
Set the agent to follow a give path starting at index.
getAspect
()
Number
Gets the aspect property. Used for color codes could be used for other purposes
Returns:
Number:
aspect
move
(
-
accel
-
stepSize
Moves the agent with the given accel => speed => position
render
()
Animate agent.
setCurrentMobility
(
-
mobility
Set mobility correction applied to the current velocity
Parameters:
-
mobility
Numberfactor 0.0-1.0
setTargetInContext
(
-
context
Sets as the agent target the nearest point of a Context.
Parameters:
-
context
Context
step
(
-
stepSize
Advances the simulation of the agent one stepSize and moves the agent to its next possition defined by the group behavior mode.
Parameters:
-
stepSize
Numberdefined by the simulation step size