Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

CameraRigOptions

What useCamera takes. A setting left out keeps the engine’s value.

Property Type Default value Description
bodyNearEye? BodyNearEye BodyNearEye.Fade What the camera does with her body when the eye comes close.
distance? number undefined Metres from her the eye starts at, within the zoom’s stops; the wheel moves it from there. Left out, the eye starts where the last scene’s camera stood, within the stops, or the preset’s start.
eyeHeightFraction? number 0.78 How far up her height the aim sits when the eye is close.
fieldOfView? CameraFieldOfView | null undefined The player’s Field of view setting reaches this rig’s lens: the lens shows the setting’s degrees across a 16:9 screen, within the range, or the game’s figure where the setting is left to it or fixed, and fov goes unread. Left out, the lens is fov and the Settings panel shows the row greyed out.
firstPersonMaxPolarAngle? number MathUtils.degToRad(179) The lowest the drag drops the eye in first person, in radians from straight up.
firstPersonMinPolarAngle? number MathUtils.degToRad(1) The highest the drag lifts the eye in first person, in radians from straight up.
follow? ViewTarget | null CameraTarget.ViewTarget What the camera keeps in frame: the player unless told otherwise; null is a free orbit the player drags, for a menu.
fov? number 50 Degrees the lens sees top to bottom.
latch? boolean false Whether the steer is read in the azimuth a push began at, held until the stick lets go or turns past latchTurn, rather than the live one. A camera that turns toward her on its own needs it, or it spirals (see the top of this file).
maxDistance? number 9 The farthest the wheel takes the eye, in metres.
maxPolarAngle? number MathUtils.degToRad(170) The lowest the drag drops the eye, in radians from straight up. A following camera’s eye comes in along its line where it would pass within 0.3 m of the ground under her feet.
minDistance? number 0.7 The nearest the wheel brings the eye, in metres.
minPolarAngle? number MathUtils.degToRad(10) The highest the drag lifts the eye, in radians from straight up.
pitch? number undefined Degrees the eye starts looking down, negative up, within the tilt’s stops. Left out, the eye keeps the tilt the last scene’s camera left, or the preset’s start.
settle? boolean true Whether the eye settles in front of what stands between it and the aim. A side view keeps its distance instead, as Unreal’s side-scroller turns its spring arm’s collision test off.
through? ComponentIdentity undefined The component the devtools row is called: the game’s own, where it spreads the rig onto controls of its own.
tuning? Partial<CameraTuning> undefined The settings only this rig reads, shown on its Settings leaf.