# getElementRotation (Compartilhado)

> Lê a rotação de um elemento em graus.

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

## Sintaxe

```lua
vec3|false getElementRotation(element element)
```

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `element` | `element` | Elemento a ler. |

## Retorno

Um `vec3` com a rotação em graus, ou `false` se o elemento não tem rotação.

## Exemplo

```lua
local rotation = getElementRotation(localPlayer)
outputDebugString(("Heading: %d°"):format(rotation.z))
```

## Veja também

- [setElementRotation (Compartilhado)](https://wiki.mymp.gg/pt/setElementRotation.md): Define a rotação 3D de um elemento em graus.
- [getElementPosition (Compartilhado)](https://wiki.mymp.gg/pt/getElementPosition.md): Lê a posição de um elemento no mundo.
- [getElementMatrix (Compartilhado)](https://wiki.mymp.gg/pt/getElementMatrix.md): Lê a matriz 4x4 de um elemento, feita da sua posição e rotação.
