Agents can be moved around the world in a number of ways: by specifying their
locations, their velocities and their accelerations. Object locations are
typically set during initialization, while velocity and acceleration are
typically adjusted dynamically over the course of the simulation.
Agents can be explicitly moved to a specific location using the method
move in the class
Real:
# move the agent to the location (10, 0, 0) in 3D space...
self move to (10, 0, 0). |
The speed of an agent can be set using the method
set-velocity in the class
Real:
# set the agent's velocity to (0, 0, 10)
self set-velocity to (0, 0, 10). |
The acceleration of an agent can be set using the method
set-acceleration in the class
Real:
# set the agent's acceleration to (0, -9.8, 0)
self set-acceleration to (0, -9.8, 0). |