Instance Method


Tells the delegate that an agent is about to perform its next simulation step.


optional func agentWillUpdate(_ agent: GKAgent)



The agent object that will perform its next simulation step.


Implement this method when you want to update the agent simulation with data from an external source, such as node position and orientation information updated by the SceneKit or SpriteKit physics engine. Set the position and rotation properties of the agent (as a GKAgent2D or GKAgent3D object) so that the next simulation step will take your changes to those properties into account.

See Also

Synchronizing with Agents

func agentDidUpdate(GKAgent)

Tells the delegate that an agent has just performed a simulation step.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software