setViewDistance: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(Comment cleanup, description update)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Set rendering distance, in metres. Default is 900m (in OFP) or 1,200m (in ArmA), accepted range is 500m to 5,000m (in OFP) or 10,000m (in ArmA). Setting view distance to <<nowiki>=</nowiki> 0 resets the value to the one set in Options->Video->General->Visibility->Overall |= Description
| Set rendering distance. Setting view distance to &lt;{{=}} 0 resets the value to the client's options (set in <tt>Options → Video → General → Visibility → Overall</tt>).
{{Informative|Client-side max view distance is limited by the server's view distance.}}
{{Important|view distance also defines the maximum distance between a unit and any other unit they can [[knowsAbout|know about]].
Higher view distance will involve more AI simulation cycles for every unit, which causes low performance.}}
View distance information by game, to format ''min scripted/min UI/'''default'''/max UI/max scripted'':<br />
{{GVI|ofp|1.00}} ? / 500 / '''900''' / 5000 / ?<br />
{{GVI|arma1|1.00}} ? / ? / '''1200''' / 10000 / ?<br />
{{GVI|arma2|1.00}} ? / ? / '''1200''' / 10000 / 15000<br />
{{GVI|arma3|1.00}} 200 / 500 / '''1600''' / 12000 / 40000 |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''setViewDistance''' distance |= Syntax
| [[setViewDistance]] distance |= Syntax


|p1= distance: [[Number]] |= Parameter 1
|p1= distance: [[Number]] - distance in metres |= Parameter 1


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value
Line 21: Line 29:
|x1= <code>[[setViewDistance]] 2250;</code> |= Example 1
|x1= <code>[[setViewDistance]] 2250;</code> |= Example 1


|x2= <code>//reset view distance in Arma 3
|x2= <code>[[setViewDistance]] -1; {{codecomment|// reset view distance in {{arma3}}}}</code> |= Example 2
[[setViewDistance]] -1;</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[viewDistance]], [[setDetailMapBlendPars]], [[setTerrainGrid]], [[getObjectViewDistance]], [[setObjectViewDistance]] |= See also
| [[viewDistance]], [[setDetailMapBlendPars]], [[setTerrainGrid]], [[getObjectViewDistance]], [[setObjectViewDistance]] |= See also
 
}}
}}


<h3 style="display:none">Notes</h3>
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<dt class="note">'''[[User:Ceeeb|Ceeeb]]'''
<dd class="note">
In '''OFP v1.96''', view distance also defines the maximum distance between a unit and any other unit they can [[knowsAbout|know about]]. Higher view distance will involve more AI simulation cycles for every unit, which causes low performance.
<!-- Note Section END -->
</dl>
<dl class="command_description">
<!-- Note Section BEGIN -->
<dt class="note">'''[[User:galzohar|galzohar]]'''
<dd class="note">
I tested the above and it seems to apply in Arma 2 as well. AI at a bit above 500m would stop engaging when I lowered the view distance down to 500m and re-engaged when I increased it back.
<!-- Note Section END -->
</dl>
<dl class="command_description">
<!-- Note Section BEGIN -->
<dt class="note">'''[[User:DesertEagle|DesertEagle]]'''
<dd class="note">
In ArmA 2 viewDistance can be set up to 15 km with this command ( while from interface only 10 km )
<!-- Note Section END -->
</dl>
</dl>


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|SETVIEWDISTANCE]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.46|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|SETVIEWDISTANCE]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.46|SETVIEWDISTANCE]]
[[Category:Scripting Commands ArmA|SETVIEWDISTANCE]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on October 15, 2014 - 03:14 (UTC)</dd>
<dt class="note">[[User:Benargee|Benargee]]</dt>
<dd class="note">In Arma 3, Values below '''200''' have no visible effect.
</dd>
</dl>
<!-- DISCONTINUE Notes -->
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on November 20, 2014 - 00:35 (UTC)</dd>
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt>
<dd class="note">
To clarify Bernagee's post, values under 200 have '''no''' effect. Tested by [[setViewDistance]] below 200, then [[hint]] [[viewDistance]]. It will not go below 200. Also, as object view distance can only be, at a maximum, the view distance, object view distance will also be reset to 200.
</dd>
</dl>
<!-- DISCONTINUE Notes -->
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on June 8, 2015 - 10:25 (UTC)</dd>
<dt class="note">[[User:MisterGoodson|MisterGoodson]]</dt>
<dd class="note">
Client-side max view distance is limited by the server's view distance.
Tested in Arma 3.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 16:13, 25 May 2018

Hover & click on the images for description

Description

Description:
Set rendering distance. Setting view distance to <= 0 resets the value to the client's options (set in Options → Video → General → Visibility → Overall).
Client-side max view distance is limited by the server's view distance.
view distance also defines the maximum distance between a unit and any other unit they can know about. Higher view distance will involve more AI simulation cycles for every unit, which causes low performance.

View distance information by game, to format min scripted/min UI/default/max UI/max scripted:
Logo A0.png1.00 ? / 500 / 900 / 5000 / ?
Logo A1 black.png1.00 ? / ? / 1200 / 10000 / ?
Logo A2.png1.00 ? / ? / 1200 / 10000 / 15000

Arma 3 logo black.png1.00 200 / 500 / 1600 / 12000 / 40000
Groups:
Uncategorised

Syntax

Syntax:
setViewDistance distance
Parameters:
distance: Number - distance in metres
Return Value:
Nothing

Examples

Example 1:
setViewDistance 2250;
Example 2:
setViewDistance -1; // reset view distance in Arma 3

Additional Information

See also:
viewDistancesetDetailMapBlendParssetTerrainGridgetObjectViewDistancesetObjectViewDistance

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section