# getCameraMatrix (Client)

> Returns where the camera is and where it looks.

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

## Syntax

```lua
vec3, vec3, float, float getCameraMatrix()
```

## Returns

The position, the point it looks at, the sideways tilt in degrees and the field of view in degrees. Outside `setCameraMatrix`, the point is 1 m in front of the camera.

## Example

```lua
local position, lookAt, roll, fov = getCameraMatrix()
outputDebugString(("Camera at %.1f, %.1f, %.1f"):format(position.x, position.y, position.z))
```

## See also

- [setCameraMatrix (Client)](https://wiki.mymp.gg/en/setCameraMatrix.md): Fixes the camera at a point, looking at another, until setCameraTarget gives it back to a ped.
- [getCameraTarget (Client)](https://wiki.mymp.gg/en/getCameraTarget.md): Returns the player or ped the camera is following.
