# setPedCameraRotation (Client)

> 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.

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

## Syntax

```lua
bool setPedCameraRotation(ped thePed, float rotation)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `thePed` | `ped` | The ped or player. For any element, the function also applies to the elements below it, and the result is the element's own. |
| `rotation` | `float` | The rotation in degrees, around the vertical axis. |

## Returns

`true` if the rotation was applied. `false` if the element is not a ped or player.

## Example

```lua
local ped = createPed("male01", 2495.0, -1685.0, 13.5)
setPedCameraRotation(ped, 90)
setPedControlState(ped, "aim_weapon", true)
```

## See also

- [getPedCameraRotation (Client)](https://wiki.mymp.gg/en/getPedCameraRotation-client.md): 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.
- [setPedAnalogControlState (Client)](https://wiki.mymp.gg/en/setPedAnalogControlState.md): Presses one of a ped's analog controls only partly, for example to make it walk slowly or steer gently.
- [setPedControlState (Client)](https://wiki.mymp.gg/en/setPedControlState.md): Presses or releases one of a ped's controls as if it were a key, for example to make it walk, jump or shoot.
