# getElementRotation (Compartido)

> Lee la rotación de un elemento en grados.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Función Lua
- **Lado**: Compartido
- **Categoría**: Elementos
- **URL**: https://wiki.mymp.gg/es/getElementRotation

## Sintaxis

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

## Parámetros

| Nombre | Tipo | Descripción |
| --- | --- | --- |
| `element` | `element` | Elemento a leer. |

## Retorno

Un `vec3` con la rotación en grados, o `false` si el elemento no tiene rotación.

## Ejemplo

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

## Ver también

- [setElementRotation (Compartido)](https://wiki.mymp.gg/es/setElementRotation.md): Define la rotación 3D de un elemento en grados.
- [getElementPosition (Compartido)](https://wiki.mymp.gg/es/getElementPosition.md): Lee la posición de un elemento en el mundo.
- [getElementMatrix (Compartido)](https://wiki.mymp.gg/es/getElementMatrix.md): Lee la matriz 4x4 de un elemento, hecha con su posición y rotación.
