{"name":"getLighting","title":"getLighting","type":"command","url":"https://community.bistudio.com/wiki/getLighting","revid":377678,"updated":"2026-01-02T09:02:42Z","groups":["Lights"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Gets general environment's light settings.","syntaxes":[{"syntax":"getLighting","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [ambientLightColor, ambientLightBrightness, lightDirection, starsVisibility]\n- ambientLightColor: Color (RGB) - ambientLightBrightness: Number - lightDirection: Vector3D - starsVisibility: Number","text":"Array with [ambientLightColor, ambientLightBrightness, lightDirection, starsVisibility]\n\n- ambientLightColor: Color (RGB)\n- ambientLightBrightness: Number\n- lightDirection: Vector3D\n- starsVisibility: Number"},"form":"nullary"}],"examples":[{"code":["getLighting; // returns [[0.646753,0.781818,1],28526.2,[-0.0167152,0.211598,-0.977214],0]"]},{"code":["getLighting params [\"_ambientLightColour\", \"_ambientLightBrightness\", \"_lightDirection\", \"_starsVisibility\"];"]}],"see_also":["getLightingAt","moonPhase","Light Source Tutorial"],"notes":[{"user":"POLPOX","date":"2023-09-18T13:20:29Z","text":"Possible to check if a position is in a shadow.\n\n```sqf\n[player,\"VIEW\"] checkVisibility [eyePos player,eyePos player vectorDiff ((getLighting#2) vectorMultiply 200)]\n```"}]}