Skip to reading
GDScript Programming & Godot

31. Cameras, scene changes and 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
Code example
func run() -> void:
    await ActivateCamera({"cameraId": "wide", "duration": 0.8, "wait": true})
    await ZoomBlur({
        "strength": 0.2,
        "duration": 0.5,
        "includeGUI": false,
        "wait": true
    })

Use PCA camera actions for authored camera behavior. They know about the game’s camera definitions, blending and follow configuration. Directly replacing a camera node can leave PCA’s camera state pointing somewhere else.

Use ChangeScene for an adventure room change. Godot’s SceneTree.change_scene_to_file replaces the top-level Godot scene and can discard the PCA editor/runner structure; it is not the normal way to enter another PCA room.

Short zoom blur, fades, overlays, screen shader styles and local effects use different scopes. Restore temporary input locks, pointer state and effects after a sequence. Test the target renderer: a supported data field does not make every GPU effect available on every render path.

Page 40 of 378Permalink
Go to page