ACE3/addons/common/functions/fnc_getZoom.sqf
2015-09-21 01:07:49 +02:00

18 lines
319 B
Plaintext

/*
* Author: commy2
* Returns a value depending on current zoom level.
*
* Arguments:
* None
*
* Return Value:
* Zoom <NUMBER>
*
* Public: Yes
*/
#include "script_component.hpp"
if (!hasInterface) exitWith {0};
(0.5 - ((worldToScreen positionCameraToWorld [0, 1, 1]) select 1)) * (getResolution select 5)