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

# maxSpeed

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

## Declaration

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

## Discussion

Discussion When an agent evaluates the goals listed in its behavior property, the result is an acceleration vector that changes the velocity of the agent. If the magnitude of the new velocity is greater than this value, the velocity is reduced to match this value.

## See Also

### Related Documentation

- [speed](gameplaykit/gkagent/speed.md)

### Constraining an Agent’s Movement

- [mass](gameplaykit/gkagent/mass.md)
- [maxAcceleration](gameplaykit/gkagent/maxacceleration.md)
- [radius](gameplaykit/gkagent/radius.md)
