# setCameraMatrix (Client)

> Fixes the camera at a point, looking at another, until `setCameraTarget` gives it back to a ped.

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

## Syntax

```lua
bool setCameraMatrix(float x, y, z, float lookAtX, lookAtY, lookAtZ [, float roll = 0, float fov = 70])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `x, y, z` | `float` | Where the camera stands. A `vec3` also works. |
| `lookAtX, lookAtY, lookAtZ` | `float` | Where it looks. It must differ from the position. A `vec3` also works. |
| `roll` | `float` | The sideways tilt, in degrees. *(default: `0`)* |
| `fov` | `float` | The field of view in degrees. 0 or less becomes 70; 180 or more becomes 179. *(default: `70`)* |

## Returns

`true` once the camera is placed.

## Example

```lua
setCameraMatrix(1468.0, -1755.0, 60.0, 1544.0, -1675.0, 13.5, 0, 60)
```

## See also

- [getCameraMatrix (Client)](https://wiki.mymp.gg/en/getCameraMatrix.md): Returns where the camera is and where it looks.
- [setCameraTarget (Client)](https://wiki.mymp.gg/en/setCameraTarget.md): Makes the camera follow a player or ped, as in normal play. It also undoes setCameraMatrix and attachCameraToElement.
- [attachCameraToElement (Client)](https://wiki.mymp.gg/en/attachCameraToElement.md): Attaches the camera to an element: it follows the element's position and rotation until setCameraTarget gives it back to a ped.
