<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKAgent3D",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKAgent3D"
  },
  "title" : "GKAgent3D"
}
-->

# GKAgent3D

An agent that operates in a three-dimensional space.

```
class GKAgent3D
```

## 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`](/documentation/GameplayKit/GKAgent); however, you use instances of the [`GKAgent3D`](/documentation/GameplayKit/GKAgent3D) class to implement agent-based gameplay in a 3D game.

To learn more about using goals and agents, see [Agents, Goals, and Behaviors](https://developer.apple.com/library/archive/documentation/General/Conceptual/GameplayKit_Guide/Agent.html#//apple_ref/doc/uid/TP40015172-CH8) in [GameplayKit Programming Guide](https://developer.apple.com/library/archive/documentation/General/Conceptual/GameplayKit_Guide/index.html#//apple_ref/doc/uid/TP40015172).

## Topics

### Managing an Agent’s Position and Orientation

[`position`](/documentation/GameplayKit/GKAgent3D/position)

The current position of the agent in 3D space.

[`rotation`](/documentation/GameplayKit/GKAgent3D/rotation)

The orientation of the agent in 3D space.

### Running the Agent Simulation

[`-  updateWithDeltaTime:`](/documentation/GameplayKit/GKAgent3D/update(deltaTime:))

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

[`velocity`](/documentation/GameplayKit/GKAgent3D/velocity)

The current velocity of the agent in 3D space.

### Instance Properties

[`rightHanded`](/documentation/GameplayKit/GKAgent3D/rightHanded)

## Relationships

### Conforms To

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`GKAgent`](/documentation/GameplayKit/GKAgent)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)