Instance Property

velocity

The current velocity of the agent in 2D space.

Declaration

@property(nonatomic, readonly) vector_float2 velocity;

Discussion

An agent’s velocity is a calculated property—the velocity vector is determined by an agent’s facing direction (its rotation property) and its speed property.

See Also

Running the Agent Simulation

- updateWithDeltaTime:

Causes the agent to evaluate its goals and update its position, rotation, and velocity accordingly.