M MY Multiplayer: Wiki
Side
Kind

getCameraMatrix

Client

Returns where the camera is and where it looks.

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

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

See also