Skip to reading
GDScript Programming & Godot

SetCameraTargets()

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
Source table from SetCameraTargets(), page 138
Option key / fieldMeaning and inputDefault
Respect Room Camera Bounds respectBoundsApply the room camera bounds to this camera behavior.true

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await SetCameraBehavior({"cameraId": "wide", "enabled": false, "mode": "fixed"})

In use. Enable advanced behavior and choose Follow for a tracking shot. Changing the settings is different from activating that camera. Path mode needs usable path points; a group view needs valid targets. Keep Minimum Distance no greater than Maximum Distance.

Set Camera Targets

Replace the main, group and look-at targets used by an advanced camera.

Source table from SetCameraTargets(), page 138
Option key / fieldMeaning and inputDefault
Camera (empty = active) cameraIdChoose an authored camera ID. May be blank.Blank
Follow Target targetIdChoose a scene entity ID. May be blank."player"
Additional Target IDs (comma separated) targetIdsText.Blank
Look At Target (optional) lookAtIdChoose a scene entity ID. May be blank.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await SetCameraTargets({"cameraId": "wide", "targetId": "archive_door", "targetIds": ""})

In use. Use the player as the follow target and Elias as the look-at target for a conversation. Supply IDs in the format the selected field expects. This does not create the targets or move either actor.

Page 138 of 378Permalink
Go to page