Class

GKAgent3D

An agent that operates in a three-dimensional space.

Declaration

@interface GKAgent3D : GKAgent

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 GKAgent3D class to implement agent-based gameplay in a 3D game.

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

position

The current position of the agent in 3D space.

rotation

The orientation of the agent in 3D space.

Running the Agent Simulation

- updateWithDeltaTime:

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

velocity

The current velocity of the agent in 3D space.

Instance Properties

Relationships

Inherits From

See Also

Agents, Goals, and Behaviors

GKAgent

A component that moves a game entity according to a set of goals and realistic constraints.

GKAgent2D

An agent that operates in a two-dimensional space.

GKGoal

An influence that motivates the movement of one or more agents.

GKBehavior

A set of goals that together influence the movement of an agent.

GKCompositeBehavior

A set of behaviors, each of which is a set of goals, that together influence the movement of an agent.

GKPath

A polygonal path that can be followed by an agent.

GKAgentDelegate

Implement this protocol to synchronize the state of an agent with its visual representation in your game.