{"name":"fogParams","title":"fogParams","type":"command","url":"https://community.bistudio.com/wiki/fogParams","revid":353028,"updated":"2024-03-12T11:39:48Z","groups":["Environment"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"A getter for setFog (Alt Syntax). Returns extended params for the fog","syntaxes":[{"syntax":"fogParams","params":[],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"in setFog format: [fogValue, fogDecay, fogBase]"},"form":"nullary"}],"examples":[{"code":["private _fog = fogParams;"]}],"see_also":["setFog","fog","fogForecast","rainParams"],"notes":[{"user":"POLPOX","date":"2023-09-23T06:51:53Z","text":"To return a position (ASL Height)'s approx. fog level\n\n```sqf\nprivate _getFogPowerASL = {\n    fogParams params [\"_fogPower\",\"_fogDecay\",\"_fogHeight\"] ;\n    private _height = _this - _fogHeight;\n    (_fogPower * 0.5 ^ (_height * _fogDecay / 2.45) max 0)\n};\n\n(AGLToASL (positionCameraToWorld [0,0,0]) # 2) call _getFogPowerASL;\n```\n\nNote that, this could return >1 value if fogDecay is not 0."}]}