---
name: "setTurretLimits"
type: command
status: ok
groups: ["Turrets"]
arma3_since: "2.12"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setTurretLimits
revid: 379081
updated: 2026-09-27T07:57:22Z
---

# setTurretLimits

*Command · Turrets · Arma 3 v2.12*

Locality: arguments **local** · effect **global**

## Description

Sets the rotation and elevation limits for the given turret. The limits are relative to model orientation of the turret. For example to allow 360 degree turning it is enough to set turn limits to (-180, 180). The limits can only be set within the limits defined in config and cannot exceed them. To reset to config defaults pass the turret argument only (Example 2).

## Syntax

### Syntax 1

```sqf
vehicle setTurretLimits [turret, minTurn, maxTurn, minElev, maxElev, soft]
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md) - vehicle the turret belongs to
- `turret`: Turret Path - turret path
- `minTurn`: [Number](../topics/Number.md) - from 0 to -angle in degrees (left)
- `maxTurn`: [Number](../topics/Number.md) - from 0 to +angle in degrees (right)
- `minElev`: [Number](../topics/Number.md) - from 0 to -angle in degrees (down)
- `maxElev`: [Number](../topics/Number.md) - from 0 to +angle in degrees (up)
- `soft`: [Boolean](../topics/Boolean.md) - (Optional) [true](../commands/true.md) to gradually move turret to the new limits (if turret is currenty oriented out of new limts). [false](../commands/false.md) to snap to the new limits. Default: [false](../commands/false.md) *(since arma3 2.22)*

**Returns:** [Nothing](../topics/Nothing.md)

### Syntax 2

```sqf
vehicle setTurretLimits [turret]
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md) - vehicle the turret belongs to
- `turret`: Turret Path - turret path (to reset)

### Syntax 3

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
m2 setTurretLimits [[0], -45, 45, -10, 10];
```

### Example 2

```sqf
m2 setTurretLimits [[0]]; //reset
```

### Example 3

```sqf
m2 setTurretLimits [[0], -45, 45, -10, 10, true];
```

## See also

[getTurretLimits](../commands/getTurretLimits.md) · [setTurretOpticsMode](../commands/setTurretOpticsMode.md) · [turretLocal](../commands/turretLocal.md) · [selectWeaponTurret](../commands/selectWeaponTurret.md) · [lockCameraTo](../commands/lockCameraTo.md)

<sub>Source: [BI Community Wiki — setTurretLimits](https://community.bistudio.com/wiki/setTurretLimits) (revision 379081).</sub>
