Skip to reading
Cameras, Lighting & Rendering

26 Shake, fades and camera ownership

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView PDF page

Camera Shake offsets the view briefly, then restores the original offsets. Use it for a bell strike, impact or short tremor. Begin with a small power and a short duration; large shake is tiring and can make precision clicking difficult.

Code example
await CameraShake({
    "direction": "horizontal",
    "duration": 0.35, "power": 0.04
})

Direction can be horizontal, vertical or both. Power is a camera offset amount rather than a pixel count, so compare it at the game’s actual lens and subject distance. A 2D Shake Screen effect is a different presentation tool; do not accidentally combine two shakes at full strength.

Fade Screen and Screen Transition conceal a change or mark a passage of time. They do not place the camera. If a new room begins on the wrong shot after a fade, repair its default camera or entry action.

First-person and XR normally own their gameplay camera. Activate Camera reports a failure while that ownership applies; use a cutscene or return to third-person before activating a third-person shot. A locked 2D Stage also rejects arbitrary free-camera moves.

After a manual orbit or move, explicitly activate the intended gameplay shot. This is clearer than expecting a follow controller to guess when the cinematic is over.

Page 32 of 109Permalink
Go to page