Attention
You are reading the latest
(unstable) version of this documentation, which may document features not available
or compatible with Godot 3.x.
Checking the stable version of the documentation...
Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0
. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please open an issue.
OpenXRInterface¶
Inherits: XRInterface < RefCounted < Object
Our OpenXR interface.
Description¶
The OpenXR interface allows Godot to interact with OpenXR runtimes and make it possible to create XR experiences and games.
Due to the needs of OpenXR this interface works slightly different than other plugin based XR interfaces. It needs to be initialized when Godot starts. You need to enable OpenXR, settings for this can be found in your games project settings under the XR heading. You do need to mark a viewport for use with XR in order for Godot to know which render result should be output to the headset.
Tutorials¶
Properties¶
|
Methods¶
get_action_sets ( ) const |
|
get_available_display_refresh_rates ( ) const |
|
is_action_set_active ( String name ) const |
|
void |
set_action_set_active ( String name, bool active ) |
Signals¶
pose_recentered ( )
Informs the user queued a recenter of the player position.
session_begun ( )
Informs our OpenXR session has been started.
session_focussed ( )
Informs our OpenXR session now has focus.
session_stopping ( )
Informs our OpenXR session is stopping.
session_visible ( )
Informs our OpenXR session is now visible (output is being sent to the HMD).
Property Descriptions¶
float display_refresh_rate = 0.0
The display refresh rate for the current HMD. Only functional if this feature is supported by the OpenXR runtime and after the interface has been initialized.
Method Descriptions¶
Array get_action_sets ( ) const
Returns a list of action sets registered with Godot (loaded from the action map at runtime).
Array get_available_display_refresh_rates ( ) const
Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the OpenXR runtime and after the interface has been initialized.
bool is_action_set_active ( String name ) const
Returns true
if the given action set is active.
void set_action_set_active ( String name, bool active )
Sets the given action set as active or inactive.