{"name":"setViewDistance","title":"setViewDistance","type":"command","url":"https://community.bistudio.com/wiki/setViewDistance","revid":364699,"updated":"2024-05-25T17:28:31Z","groups":["System","Environment"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","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`).\n\n> [!NOTE]\n> In previous versions, client's max view distance was limited by the server's view distance.\n\n> [!IMPORTANT]\n> View distance also defines the maximum distance between a unit and any other unit they can know about.\n> Higher view distance will involve more AI simulation cycles for every unit, which causes low performance. See Arma 3: Performance Optimisation.\n\n| Game | min. scripted | min. UI | default | max. UI | max. scripted |\n|---|---|---|---|---|---|\n| Arma 3 | 200 | 500 | **1600** | 12000 | 40000 |\n| Arma 2: Operation Arrowhead | 200 | 500 | **2500** | 10000 | 15000 |\n| Arma 2 | 200 | 500 | **3000** | 10000 | 15000 |\n| Armed Assault | 200 | 500 | **1200** | 10000 | 15000 |\n| Operation Flashpoint | 500 | 500 | **900** | 5000 | 5000 |","syntaxes":[{"syntax":"setViewDistance distance","params":[{"name":"distance","type":"Number","description":"distance in metres; Arma 3 v1.00 a negative value resets the view distance to user video setting","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"distance"}}],"examples":[{"code":["setViewDistance 2250;"]},{"code":["setViewDistance -1; // reset view distance in Arma 3"]}],"see_also":["viewDistance","setDetailMapBlendPars","setTerrainGrid","getObjectViewDistance","setObjectViewDistance"]}