Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
OpenXRSpatialContainerExtension
Inherits: OpenXRExtensionWrapper < Object
OpenXR extension that handles spatial containers.
Description
OpenXR extension that handles spatial containers. Enabling this extension will automatically create a main spatial container, and update the lifecycle of the XR application.
Methods
is_enabled() const |
|
is_spatial_container_active() const |
|
request_spatial_container_bounds_mode(bounds_mode: BoundsMode) |
|
request_spatial_container_visible(visible: bool) |
Signals
spatial_container_bounds_changed(spatial_container_rid: RID, spatial_container_infinite_bounds: bool, spatial_container_bounds_mode: int, spatial_container_bounds: Vector3) 🔗
Emitted when the bounds of the spatial container specified by spatial_container_rid are updated.
spatial_container_bounds_mode_request_denied(spatial_container_rid: RID) 🔗
Emitted when a request to update the bounds mode of the spatial container specified by spatial_container_rid is denied by the runtime.
spatial_container_closed(spatial_container_rid: RID) 🔗
Emitted when the spatial container specified by spatial_container_rid is closed.
spatial_container_interactable_changed(spatial_container_rid: RID, spatial_container_interactable: bool) 🔗
Emitted when the interactability of the spatial container specified by spatial_container_rid is updated.
spatial_container_visible_changed(spatial_container_rid: RID, spatial_container_visible: bool) 🔗
Emitted when the visibility of the spatial container specified by spatial_container_rid is updated.
spatial_container_visible_request_denied(spatial_container_rid: RID) 🔗
Emitted when the runtime denies the visibility request of the spatial container specified by spatial_container_rid.
Method Descriptions
Vector3 get_spatial_container_bounds() 🔗
Retrieves the bounds of the main spatial container.
OpenXRSpatialContainerState get_spatial_container_state() 🔗
Retrieves the OpenXRSpatialContainerState of the main spatial container.
Array get_supported_bounds_modes() 🔗
Returns an array of supported spatial container bounds mode, see BoundsMode.
Returns true if spatial containers are enabled in the project settings and available on the current runtime.
bool is_spatial_container_active() const 🔗
Returns true if the main spatial container is active.
bool request_spatial_container_bounds_mode(bounds_mode: BoundsMode) 🔗
Sends a request to the runtime to update the bounds mode of the main spatial container.
If the request is accepted, spatial_container_bounds_changed will be emitted with the updated bounds mode.
Otherwise, spatial_container_bounds_mode_request_denied will be emitted.
bool request_spatial_container_visible(visible: bool) 🔗
Sends a request to the runtime to update the visibility of the spatial container.
If the request is accepted, spatial_container_visible_changed will be emitted with the updated visibility.
Otherwise, spatial_container_visible_request_denied will be emitted.