---
name: "setDynamicSimulationDistance"
type: command
status: ok
groups: ["Dynamic Simulation"]
arma3_since: "1.68"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/setDynamicSimulationDistance
revid: 363576
updated: 2024-04-07T11:30:33Z
---

# setDynamicSimulationDistance

*Command · Dynamic Simulation · Arma 3 v1.68*

## Description

Sets activation distance of Arma 3: Dynamic Simulation for given category.

## Syntax

```sqf
category setDynamicSimulationDistance distance
```

**Parameters:**

- `category`: [String](../topics/String.md) - can be one of:
  - `"Group"` - infantry units. Set to a reasonable distance, player should not see disabled infantry units. Default value 500m
  - `"Vehicle"` - vehicles with crew. Set to a reasonable distance, player should not see disabled vehicles. Default value 350m
  - `"EmptyVehicle"` - all vehicles without crew. Separated from Props as Empty Vehicles have often more complex damage states and selective destruction. Their activation distance should be larger than the one used for Props. Default value 250m
  - `"Prop"` - static objects. Anything from a small tin can to a building. Default value 50m
- `distance`: [Number](../topics/Number.md)

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

## Examples

### Example 1

```sqf
"Group" setDynamicSimulationDistance 1000;
```

## See also

Arma 3: Dynamic Simulation · [dynamicSimulationDistance](../commands/dynamicSimulationDistance.md) · [setDynamicSimulationDistanceCoef](../commands/setDynamicSimulationDistanceCoef.md) · [dynamicSimulationDistanceCoef](../commands/dynamicSimulationDistanceCoef.md)

## Community notes

**Demellion** — 2017-03-19

Desired distances for "Group" and "Vehicle" must be based on [viewDistance](../commands/viewDistance.md) and [fog](../commands/fog.md) to exclude any rendering problems with frequently moving objects. Example:

```sqf
"Group" setDynamicSimulationDistance ((viewDistance * 0.8) - (viewDistance * fog)); // 80% of maximum rendering and fog distance
```

But that might impair objects simulation if you are using long-scope optics, so there's an even better solution using [cameraView](../commands/cameraView.md) with it:

```sqf
0 spawn {
    while { true } do
    {
        if (cameraView isEqualTo "GUNNER") then
        {
            "Group" setDynamicSimulationDistance (viewDistance - (viewDistance * fog));
            // Scoped
        }
        else
        {
            "Group" setDynamicSimulationDistance ((viewDistance * 0.8) - (viewDistance * fog));
            // Not scoped
        };

        uiSleep 0.25;
    };
};
```

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