Up to date

This page is up to date for Godot 4.2. If you 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

float

display_refresh_rate

0.0

bool

foveation_dynamic

false

int

foveation_level

0

float

render_target_size_multiplier

1.0

Methods

Array

get_action_sets ( ) const

Array

get_available_display_refresh_rates ( ) const

Vector3

get_hand_joint_angular_velocity ( Hand hand, HandJoints joint ) const

BitField<HandJointFlags>

get_hand_joint_flags ( Hand hand, HandJoints joint ) const

Vector3

get_hand_joint_linear_velocity ( Hand hand, HandJoints joint ) const

Vector3

get_hand_joint_position ( Hand hand, HandJoints joint ) const

float

get_hand_joint_radius ( Hand hand, HandJoints joint ) const

Quaternion

get_hand_joint_rotation ( Hand hand, HandJoints joint ) const

HandMotionRange

get_motion_range ( Hand hand ) const

bool

is_action_set_active ( String name ) const

bool

is_eye_gaze_interaction_supported ( )

bool

is_foveation_supported ( ) const

bool

is_hand_tracking_supported ( )

void

set_action_set_active ( String name, bool active )

void

set_motion_range ( Hand hand, HandMotionRange motion_range )


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