Skip to content

CameraView

A camera view, as playerCameraChangeRequest gets it and as an override gives it back: fixed, from camera.setFixed, or attached, from camera.attach.

type CameraView =
| { mode: "fixed"; position: Vector3; lookAt: Vector3; interior?: number }
| { mode: "attached"; target: CameraTarget; offset: Vector3; lookAtOffset: Vector3; angleRadians?: number };
Field Type Description
mode "fixed" | "attached" Fixed at a place, or following a target.
position Vector3 Fixed: where the camera is.
lookAt Vector3 Fixed: the point it looks at.
interior number Fixed, optional: the interior the camera is in, 0 outside, 1-18 an interior’s. Renamed in 0.28 from area.
target CameraTarget Attached: what it follows.
offset Vector3 Attached: where the camera is, from the target.
lookAtOffset Vector3 Attached: the point it looks at, from the target.
angleRadians number Attached, optional: turns the camera around the target.