ChaseCam
The camera of *First Light: Sabaean Madcaps*. A **camera behaviour**: the scene's entrypoint installs it onto the local player's `CameraRig` the moment the player is ready.
ChaseCam
The camera of First Light: Sabaean Madcaps. A camera behaviour: the scene's
entrypoint installs it onto the local player's CameraRig the moment the player
is ready.
layers.active.camera.behavior = asset.resolve("game.staging.ChaseCam", "component")
layers.active.camera.follow = player.avatar
It stands outward of the runner — away from the temple's axis — and above, and aims at a point pushed up and inward, so the madcap sits in the lower third of the picture with the terraces still to climb stacked above. The temple corkscrews, so "behind the runner" is read from where the runner stands relative to the mass rather than from a fixed heading: the shot swings around the ziggurat with the climb, and the player never steers it.
Any screen shape
Framing is stated as an area of temple in metres — frameWidth across the
frame and frameHeight up it — and the distance that fits both is solved
against the live viewport every frame. A tall phone is width-limited and stands
further back; a wide monitor is height-limited and stands at much the same
remove with more air either side. Everything that places the runner in frame
(camBack, camUp, aimUp, aimIn) is a fraction of that distance, so
the runner holds the same spot in the picture at 3:4 and at 16:9 alike.
Set aspectOverride to solve for a shape the engine is not running at — useful
for checking a phone's framing on a desktop.
What else it draws
Everything a moment does to the camera is stated in game.staging.stage and
read here:
| Source | Effect |
|---|---|
Stage.play(shot) | a staged beat owns the picture; the follow is skipped |
Stage.kick(m) | a shove shakes the shot and decays away |
Stage.widen(d) | a dash opens the lens and eases it shut |
And one behaviour of its own: while the phase is title it orbits the temple
slowly, so the title card is composed over a moving establishing shot.
Fields
frameWidth frameHeight fov · camBack camUp aimUp aimIn
anchorLift · damping cameraRadius minPullFraction minHeight ·
titleOrbitSeconds titleOrbitLift · aspectOverride
minPullFraction bounds the collision pull-in: a sweep that begins inside
geometry reports zero distance, and a camera that obeyed it would sit on the
runner's shoulder against a blank wall.
Methods
followFrame()— the pose the follow wants this frame, or nil.
Scoped to this part · feeds back into the world's score.