{"name":"getObjectFOV","operator":null,"title":"getObjectFOV","type":"command","url":"https://community.bistudio.com/wiki/getObjectFOV","revid":309149,"updated":"2022-05-03T14:11:55Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.96"}],"since":{"game":"arma3","name":"Arma 3","version":"1.96"},"arma3_since":"1.96","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns Field of View of the given object in radians. Static objects return default value, which is 1.\nFOV of objNull is 0.\nObject FOV is indirectly connected with optics magnification or player view zoom, the narrower the angle the greater the zoom.\n\n> [!NOTE]\n> The FOV returned by this command doesn't change if user has custom FOV set in profile. Use it in combination with getResolution to adjust for the difference if required.","syntaxes":[{"syntax":"getObjectFOV object","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":"for units it queries unit weapon optics/zoom, for vehicles - vehicle optics/zoom","types":["Object"],"since":null,"text":"object: Object - for units it queries unit weapon optics/zoom, for vehicles - vehicle optics/zoom"}],"returns":{"type":"Number","types":["Number"],"description":"FOV in radians","text":"Number - FOV in radians"},"form":"unary","operator":null,"left":null,"right":{"text":"object","types":["Object"]}}],"examples":[{"text":"```sqf\nprivate _objFOV = getObjectFOV player;\n```","code":["private _objFOV = getObjectFOV player;"]},{"text":"```sqf\nprivate _objFOVinDegrees = deg getObjectFOV cursorObject;\n```","code":["private _objFOVinDegrees = deg getObjectFOV cursorObject;"]},{"text":"Perceived distance to an object:\n\n```sqf\nprivate _vdist = (player distance _obj) * (getObjectFOV player / 0.75);\n```","code":["private _vdist = (player distance _obj) * (getObjectFOV player / 0.75);"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getObjectType","getResolution"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 1.96","Scripting Commands"]}