ACE3/addons/common/functions/fnc_getZoom.sqf

21 lines
367 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
2015-04-02 22:03:08 +00:00
/*
* Author: commy2
* Returns a value depending on current zoom level.
*
2015-09-20 23:07:49 +00:00
* Arguments:
* None
*
* Return Value:
* Zoom <NUMBER>
2015-04-02 22:03:08 +00:00
*
* Example:
* [] call ace_common_fnc_getZoom
*
2015-09-20 23:07:49 +00:00
* Public: Yes
2015-04-02 22:03:08 +00:00
*/
2015-09-20 23:07:49 +00:00
if (!hasInterface) exitWith {0};
(0.5 - ((worldToScreen positionCameraToWorld [0, 1, 1]) select 1)) * (getResolution select 5)