Skip to reading
GDScript Programming & Godot

SetRoomDimension()

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

Set Room Dimension

Change a scene's runtime dimension setting between 3D, 2D and 2.5D, with an option to retain the 3D layer.

Source table from SetRoomDimension(), page 150
Option key / fieldMeaning and inputDefault
Room (empty = current) sceneIdChoose a scene ID. May be blank.Blank
Room Dimension dimensionChoose: 3d, 2d, 2.5d."3d"
Keep 3D Layer keep3DLayerRetain the 3D layer when using the hybrid room setup.true

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

Code example
await SetRoomDimension({"sceneId": "lab", "dimension": "3d", "keep3DLayer": true})

In use. Use it only after the target scene has the assets and navigation appropriate to that mode. Switching a setting does not automatically build a painted backdrop, reposition every entity or convert navigation geometry.

Page 150 of 378Permalink
Go to page