Skip to reading
GDScript Programming & Godot

SetRoomCameraBounds()

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

Change Room Camera Bounds

Set whether camera bounds are enabled and edit the room's X/Z limits.

Source table from SetRoomCameraBounds(), page 154
Option key / fieldMeaning and inputDefault
Room sceneIdChoose a scene ID.Blank
Bounds Enabled enabledExplicit on/off state for the feature or response.true
Left / Minimum X minXNumber; decimals allowed.0
Right / Maximum X maxXNumber; decimals allowed.0
Top / Minimum Z minZNumber; decimals allowed.0
Bottom / Maximum Z maxZNumber; decimals allowed.0

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

Code example
await SetRoomCameraBounds({"sceneId": "lab", "enabled": true, "minX": 0})

In use. Constrain a 3D tracking camera to the playable room. These are camera limits, not the player's navigation bounds. Expanding them alone does not make an oversized backdrop walkable.

Page 154 of 378Permalink
Go to page