CameraRigOptions
What useCamera takes. A setting left out keeps the engine’s value.
Extends
Section titled “Extends”Pick<CameraProps,"follow"|"distance"|"pitch">.Partial<CameraSettings>
Properties
Section titled “Properties”| Property | Type | Default value | Description |
|---|---|---|---|
bodyNearEye? |
BodyNearEye |
BodyNearEye.Fade |
What the camera does with the character’s body when the eye comes close. |
distance? |
number |
undefined |
Metres from the character 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 the character’s 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 the character 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 the character’s 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. |
riseOverGround? |
boolean |
false |
Whether the eye keeps its distance and turns down over ground that climbs behind the character, rather than pulling in along its line to the character’s head, as a walk down a steep slope otherwise has it. It turns down at most to 40 degrees and keeps 1 m over the ground, rises at once and sinks eased; a collider still pulls the eye in. Only with settle, under the lock too, never in first person, and faded out as the player looks up past the horizon. |
settings? |
Behaviour<Trait> |
undefined |
The behaviour the camera’s devtools Settings leaf shows, one of traits, such as a Camera2D’s: the fields its ranges name, the ones that tune live. The camera’s own lens, stops and aim unless set. |
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. |
traits? |
readonly ConfigurableTrait[] |
undefined |
Traits spawned on the camera’s own entity beside its CameraTrait, such as a Camera2D’s Camera2DTrait, so an onCameraUpdate hook reads them as context.camera. As an Entity’s traits: which traits it lists is fixed at spawn, and a field whose value changes is written again. |
tuning? |
Partial<CameraTuning> |
undefined |
The settings only this rig reads, shown on its Settings leaf. |