# getLightTangent (Client)

> Reads where a rect light's width points.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Lights
- **URL**: https://wiki.mymp.gg/en/getLightTangent

## Syntax

```lua
vec3|false getLightTangent(light light)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `light` | `light` | The light. |

## Returns

A unit `vec3`, or `false` with a wrong argument.

While the light is attached to another element, the tangent is relative to it.

## Example

```lua
local light = createRectLight(0, 0, 5, 0, -1, 0)
local tangent = getLightTangent(light)
outputDebugString(("%.2f %.2f %.2f"):format(tangent.x, tangent.y, tangent.z))
```

### Note

Rect lights only. On a point or spot light it logs a warning naming its type and returns `false`.

## See also

- [setLightTangent (Client)](https://wiki.mymp.gg/en/setLightTangent.md): Changes where a rect light's width points, turning the rectangle about its normal.
- [getLightDirection (Client)](https://wiki.mymp.gg/en/getLightDirection.md): Reads where a spot or rect light points.
