Skip to reading
GDScript Programming & Godot

Gameplay: Cameras, transitions and screen effects

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
On this page

An authored camera is a reusable room view. A blend moves the view between cameras. An orbit or shake adds continuing or timed motion. Screen fades and transitions work on the presented image and need not change rooms.

ActivateCamera()#

Activate / Blend to Camera

Activate an authored camera and optionally blend to it, waiting when Wait is enabled.

Source table from Gameplay: Cameras, transitions and screen effects, page 136
Option key / fieldMeaning and inputDefault
Camera cameraIdChoose an authored camera ID.Blank
Blend Seconds (-1 = camera default) durationTime in seconds for this action. Read its timing note before assuming it waits. Range: -1.0 to 60.0.-1.0
Wait for Blend waitWhether this action should wait for its own effect to finish.true

Timing. Waits when Wait is on.

Code example
await ActivateCamera({"cameraId": "wide", "duration": 1, "wait": true})

In use. Blend to the lamp close-up over 1 second. A negative duration uses the camera's configured blend timing; 0 makes a cut. If a following action must begin after arrival, keep Wait enabled.

SetCameraBehavior()#

Set Advanced Camera Behavior

Change the selected camera's advanced behavior, targets, smoothing, framing, path and bounds settings.

Source table from Gameplay: Cameras, transitions and screen effects, page 136
Option key / fieldMeaning and inputDefault
Camera (empty = active) cameraIdChoose an authored camera ID. May be blank.Blank
Enable Advanced Camera enabledExplicit on/off state for the feature or response.false
Camera Behavior modeChoose: fixed, follow, group, framed, path."fixed"
Page 136 of 378Permalink
Go to page