# getPedCameraRotation (Client)

> Tells where a ped's camera faces, in degrees. On the local player it is the game camera; on a remote player, the one that came over the network; on a ped, the one a script set.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Controls
- **URL**: https://wiki.mymp.gg/en/getPedCameraRotation-client
- **Counterpart**: Also exists on the server, with its own implementation: [getPedCameraRotation (Server)](https://wiki.mymp.gg/en/getPedCameraRotation-server.md)

## Syntax

```lua
float|false getPedCameraRotation(ped thePed)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `thePed` | `ped` | The ped or player. |

## Returns

The rotation in degrees around the vertical axis, or `false` if the ped cannot be read.

## Example

```lua
addEventHandler("onClientRender", root, function()
    local rotation = getPedCameraRotation(localPlayer)
    if rotation then
        dxDrawText(string.format("Câmera: %.0f°", rotation), 20, 300)
    end
end)
```

## See also

- [setPedCameraRotation (Client)](https://wiki.mymp.gg/en/setPedCameraRotation.md): Changes where a ped's camera faces. On the local player it turns the game camera; on a ped it is the direction it looks and aims.
- [getPedAnalogControlState (Client)](https://wiki.mymp.gg/en/getPedAnalogControlState.md): Tells how far one of a ped's controls is pressed, from 0 to 1. It is meant for analog controls such as walking, steering and accelerating.
