# getLightTangent (Cliente)

> Lê para onde aponta a largura de uma luz rect.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Função Lua
- **Lado**: Cliente
- **Categoria**: Luzes
- **URL**: https://wiki.mymp.gg/pt/getLightTangent

## Sintaxe

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

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `light` | `light` | A luz. |

## Retorno

Um `vec3` unitário, ou `false` com um argumento errado.

Enquanto a luz está presa a outro elemento, a tangente é relativa a ele.

## Exemplo

```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))
```

### Atenção

Só para luzes rect. Numa luz point ou spot, registra um aviso que diz o tipo dela e devolve `false`.

## Veja também

- [setLightTangent (Cliente)](https://wiki.mymp.gg/pt/setLightTangent.md): Muda para onde aponta a largura de uma luz rect, girando o retângulo em torno da normal.
- [getLightDirection (Cliente)](https://wiki.mymp.gg/pt/getLightDirection.md): Lê para onde uma luz spot ou rect aponta.
