---
name: "getLighting"
type: command
status: ok
groups: ["Lights"]
arma3_since: "2.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/getLighting
revid: 377678
updated: 2026-01-02T09:02:42Z
---

# getLighting

*Command · Lights · Arma 3 v2.00*

## Description

Gets general environment's light settings.

## Syntax

```sqf
getLighting
```

**Returns:** [Array](../topics/Array.md) with [ambientLightColor, ambientLightBrightness, lightDirection, starsVisibility]
- ambientLightColor: [Color (RGB)](../topics/Color.md)
- ambientLightBrightness: [Number](../topics/Number.md)
- lightDirection: [Vector3D](../topics/Vector3D.md)
- starsVisibility: [Number](../topics/Number.md)

## Examples

### Example 1

```sqf
getLighting; // returns [[0.646753,0.781818,1],28526.2,[-0.0167152,0.211598,-0.977214],0]
```

### Example 2

```sqf
getLighting params ["_ambientLightColour", "_ambientLightBrightness", "_lightDirection", "_starsVisibility"];
```

## See also

[getLightingAt](../commands/getLightingAt.md) · [moonPhase](../commands/moonPhase.md) · Light Source Tutorial

## Community notes

**POLPOX** — 2023-09-18

Possible to check if a position is in a shadow.

```sqf
[player,"VIEW"] checkVisibility [eyePos player,eyePos player vectorDiff ((getLighting#2) vectorMultiply 200)]
```

<sub>Source: [BI Community Wiki — getLighting](https://community.bistudio.com/wiki/getLighting) (revision 377678).</sub>
