---
name: "setViewDistance"
type: command
status: ok
groups: ["System", "Environment"]
arma3_since: "0.50"
locality: {"argument": null, "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/setViewDistance
revid: 364699
updated: 2024-05-25T17:28:31Z
---

# setViewDistance

*Command · System, Environment · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

Locality: effect **local**

## Description

Set rendering distance. Setting view distance to <= 0 resets the value to the client's options (set in `Options → Video → General → Visibility → Overall`).

> [!NOTE]
> In previous versions, client's max view distance was limited by the server's view distance.

> [!IMPORTANT]
> View distance also defines the maximum distance between a unit and any other unit they can [know about](../commands/knowsAbout.md).
> Higher view distance will involve more AI simulation cycles for every unit, which causes low performance. See Arma 3: Performance Optimisation.

| Game | min. scripted | min. UI | default | max. UI | max. scripted |
|---|---|---|---|---|---|
| Arma 3 | 200 | 500 | **1600** | 12000 | 40000 |
| Arma 2: Operation Arrowhead | 200 | 500 | **2500** | 10000 | 15000 |
| Arma 2 | 200 | 500 | **3000** | 10000 | 15000 |
| Armed Assault | 200 | 500 | **1200** | 10000 | 15000 |
| Operation Flashpoint | 500 | 500 | **900** | 5000 | 5000 |

## Syntax

```sqf
setViewDistance distance
```

**Parameters:**

- `distance`: [Number](../topics/Number.md) - distance in metres; Arma 3 v1.00 a negative value resets the view distance to user video setting

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

## Examples

### Example 1

```sqf
setViewDistance 2250;
```

### Example 2

```sqf
setViewDistance -1; // reset view distance in Arma 3
```

## See also

[viewDistance](../commands/viewDistance.md) · [setDetailMapBlendPars](../commands/setDetailMapBlendPars.md) · [setTerrainGrid](../commands/setTerrainGrid.md) · [getObjectViewDistance](../commands/getObjectViewDistance.md) · [setObjectViewDistance](../commands/setObjectViewDistance.md)

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