{"name":"setViewDistance","operator":null,"title":"setViewDistance","type":"command","url":"https://community.bistudio.com/wiki/setViewDistance","revid":364699,"updated":"2024-05-25T17:28:31Z","groups":["System","Environment"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"distance","type":"Number","optional":false,"default":null,"description":"distance in metres; Arma 3 v1.00 a negative value resets the view distance to user video setting","types":["Number"],"since":null,"text":"distance: Number - distance in metres; Arma 3 v1.00 a negative value resets the view distance to user video setting"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"distance","types":["Number"]}}],"examples":[{"text":"```sqf\nsetViewDistance 2250;\n```","code":["setViewDistance 2250;"]},{"text":"```sqf\nsetViewDistance -1; // reset view distance in Arma 3\n```","code":["setViewDistance -1; // reset view distance in Arma 3"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["viewDistance","setDetailMapBlendPars","setTerrainGrid","getObjectViewDistance","setObjectViewDistance"],"notes":[],"categories":[]}