Skip to content

Dynamic View Distance

shadow-fa edited this page Feb 1, 2018 · 4 revisions
File location f\dynamicViewDistance
Enabled by default? Yes
Enable/Disable in init.sqf
Runs on client

The view distance used by a player can have a dramatic effect on two aspects of ArmA 3:

  • Performance: high view distances will cause low-powered graphics cards to really struggle, and result in poor FPS; low view distances have the opposite effect.
  • Player effectiveness: a low view distance will hinder the effectiveness of a player in the role of fast jet pilot, whereas for a player in an infantry role this would not be an issue.

The Dynamic View Distance component allows the mission designer to set a standard view distance for all players, with special view distances for players in the roles of pilots or gunners for helicopters and fixed-wing aircraft, or commanders, drivers and gunners in tanks and other vehicle types.

The component automatically switches a player's view distance to the appropriate value, depending on whether they are in a pilot / gunner / commander / driver / cargo slot or operating a UAV.

For example, a player's view distance will be normal when they are standing on the ground next to a fast jet, but will be changed to a special value the moment they get into the pilot seat – and then changed back to normal when they dismount again.

Usage

Default view distances

By default, the following view distances are used:

Vehicle Variable View Distance
None f_viewDistance_default 1600
Tanks (incl. tracked IFVs) f_viewDistance_tank 2500
Cars (incl. IFVs) f_viewDistance_car 2000
Helicopters f_viewDistance_rotaryWing 3000
Aeroplanes f_viewDistance_fixedWing 5000

Changing default view distances

Open the file init.sqf and look for the code segment entitled:

// F3 - Dynamic View Distance

In the block of code below edit the following lines, changing the value of each variable to reflect your desired settings:

f_var_viewDistance_default = 1600;
f_var_viewDistance_tank = 2500;
f_var_viewDistance_car = 2000;
f_var_viewDistance_rotaryWing = 3000;
f_var_viewDistance_fixedWing = 5000;

Changing the view distances of vehicle passengers

The variable f_var_viewDistance_crewOnly governs whether only players that are currently crewing the vehicle should have their view distance adjusted, or if players that are passengers should be affected as well.

For example, to ensure that all vehicle passengers have their view distance adjusted open the file init.sqf and change the value of f_var_viewDistance_crewOnly from true to false.

Disabling the component

Open the file init.sqf, find the following line:

[] execVM "f\dynamicViewDistance\f_setViewDistanceInit.sqf";

Change this line to:

//[] execVM "f\dynamicViewDistance\f_setViewDistanceInit.sqf";

Tips / Notes

  • This component does adjust view-distance accordingly if a player switches from a cargo slot to a crew slot.
  • This component also adjusts view-distance for the different types of UAVs when controlling a UAV.

Clone this wiki locally