CameraPanic
How the view moves when you are frightened. It rides the player's **CameraRig**, the same entity the engine's first-person controller drives, and runs after it (`executionOrder = 60`) so what it adds sits on top of the eye rather than being overwritten by it.
game.camera.CameraPanic
How the view moves when you are frightened. It rides the player's CameraRig, the same entity the
engine's first-person controller drives, and runs after it (executionOrder = 60) so what it adds
sits on top of the eye rather than being overwritten by it.
game.camera.sceneContent attaches it.
Sway
A small natural walk, more when running, more again when a creature is hunting within 24 m (it reads
the creatures' live state), unsteady when stamina is low, settling when the player stops. The
reduceShake setting scales all of it to a third without turning it off.
The capture
When the creature reaches the player the view drops to the floor and rolls onto its side, then
Bus.E.captured raises the blackout, and at 3.9 seconds Bus.E.runEnded hands the run to the
interface's GAME OVER card. It fires once per capture and cannot fire again until a new run starts.
Its timing uses its own clock: it originally read the sway clock, which only advances in the branch the capture skips, so the sequence sat on its first frame for ever.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game/camera/CameraPanic.component — how the view moves when you are scared. IT ADDS ON TOP OF THE EYE, it does not replace it. The engine's first-person controller sets the camera's position and rotation early in the frame; this runs after it and offsets what it wrote, so the look controls stay exactly as they are and the sway rides along. Two jobs, and they are the same job at different intensities: SWAY — a small, natural walk; more when running; more again when something is hunting you; unsteady when you are out of breath. It settles when you stand still. `reduceShake` scales all of it down for anyone who needs a steadier picture, without turning it off. THE CAPTURE — when the creature reaches you, the view goes down to the floor as though the thing in your hand was dropped, lies there at an angle, and then the world goes black. Nothing is shown; the sounds are the scene. It fires once per capture and cannot fire again until a new run starts.
quatParts(q: any) → void
`localRotation` answers a table; the Transform helpers hand back four separate numbers. This reads either shape, so a quaternion can be taken apart and put back together without guessing which one arrived.
| arg | type | description |
|---|---|---|
| q | any |
playerBody( ) → void
chaseState( ) → void
Is anything hunting, and how close?
settingReduceShake( ) → boolean
currentSpeed(body: any) → number
| arg | type | description |
|---|---|---|
| body | any |
playerTired(body: any) → boolean
| arg | type | description |
|---|---|---|
| body | any |
interactTicks( ) → number
How many times E has been pressed, and a way to tell the player they are held — so E fights the grip instead of opening a door or reading a note.
setPlayerGrabbed(held: boolean) → void
| arg | type | description |
|---|---|---|
| held | boolean |
awake( ) → void
onDestroy( ) → void
runGrab(dt: number) → void
THE HOLD. A creature that reaches the player holds them before anything else happens, and the player has a window to fight free. This runs BEFORE the capture sequence, and hands over to it if the window runs out — so there is one capture in this game, with a chance to avoid it, rather than a second sequence bolted alongside.
| arg | type | description |
|---|---|---|
| dt | number |
runCapture(dt: number, rig: any, base: any, baseQuat: any) → void
| arg | type | description |
|---|---|---|
| dt | number | |
| rig | any | |
| base | any | |
| baseQuat | any |
update(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.