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 |
|
get_hand_joint_angular_velocity ( Hand hand, HandJoints joint ) const |
|
get_hand_joint_linear_velocity ( Hand hand, HandJoints joint ) const |
|
get_hand_joint_position ( Hand hand, HandJoints joint ) const |
|
get_hand_joint_radius ( Hand hand, HandJoints joint ) const |
|
get_hand_joint_rotation ( Hand hand, HandJoints joint ) const |
|
get_motion_range ( Hand hand ) const |
|
is_action_set_active ( String name ) const |
|
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 ( )
Informs our OpenXR session is now visible (output is being sent to the HMD).
Enumerations¶
enum Hand:
Hand HAND_LEFT = 0
Left hand.
Hand HAND_RIGHT = 1
Right hand.
Hand HAND_MAX = 2
Maximum value for the hand enum.
enum HandMotionRange:
HandMotionRange HAND_MOTION_RANGE_UNOBSTRUCTED = 0
HandMotionRange HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER = 1
HandMotionRange HAND_MOTION_RANGE_MAX = 2
enum HandJoints:
HandJoints HAND_JOINT_PALM = 0
Palm joint.
HandJoints HAND_JOINT_WRIST = 1
Wrist joint.
HandJoints HAND_JOINT_THUMB_METACARPAL = 2
Thumb metacarpal joint.
HandJoints HAND_JOINT_THUMB_PROXIMAL = 3
Thumb proximal joint.
HandJoints HAND_JOINT_THUMB_DISTAL = 4
Thumb distal joint.
HandJoints HAND_JOINT_THUMB_TIP = 5
Thumb tip joint.
HandJoints HAND_JOINT_INDEX_METACARPAL = 6
Index metacarpal joint.
HandJoints HAND_JOINT_INDEX_PROXIMAL = 7
Index proximal joint.