Contents

GKAgent2D

An agent that operates in a two-dimensional space.

Declaration

class GKAgent2D

Overview

Agents are game entities that move according to realistic constraints and whose behavior is determined by goals that motivate movement. The general functionality of an agent is defined by the abstract superclass GKAgent; however, you use instances of the GKAgent2D class to implement agent-based gameplay in a 2D game (or in a 3D game where gameplay-relevant movement is restricted to two dimensions).

To learn more about using goals and agents, see Agents, Goals, and Behaviors in GameplayKit Programming Guide.

Topics

Managing an Agent’s Position and Orientation

Running the Agent Simulation

See Also

Agents, Goals, and Behaviors