Instance Method

updateWithDeltaTime:

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

Declaration

- (void)updateWithDeltaTime:(NSTimeInterval)seconds;

Parameters

sec

The time step for which to update the simulation; typically, the amount of time elapsed since you last called this method.

Discussion

You call this method directly on an individual agent, or on all the agents in your game through a GKComponentSystem object, whenever you want to run a step of the agent simulation. Typically, a game updates its agent simulation whenever it prepares to draw a new frame—for example, in the update: method of a SpriteKit SKScene object.

See Also

Running the Agent Simulation

velocity

The current velocity of the agent in 3D space.