---
title: speed
framework: gameplaykit
role: symbol
role_heading: Instance Property
path: gameplaykit/gkagent/speed
---

# speed

The agent’s current forward speed, in units per second.

## Declaration

```swift
var speed: Float { get set }
```

## Discussion

Discussion This property measures only the agent’s speed in the direction it faces. The concrete subclasses of GKAgent relate speed to orientation and position; see the velocity (GKAgent2D) or velocity (GKAgent3D) property for the appropriate subclass.
