class_openxrinterface.rst 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRInterface.xml.
  6. .. _class_OpenXRInterface:
  7. OpenXRInterface
  8. ===============
  9. **Inherits:** :ref:`XRInterface<class_XRInterface>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Our OpenXR interface.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. The OpenXR interface allows Godot to interact with OpenXR runtimes and make it possible to create XR experiences and games.
  15. 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.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Setting up XR <../tutorials/xr/setting_up_xr>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  26. | :ref:`float<class_float>` | :ref:`display_refresh_rate<class_OpenXRInterface_property_display_refresh_rate>` | ``0.0`` |
  27. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  28. | :ref:`bool<class_bool>` | :ref:`foveation_dynamic<class_OpenXRInterface_property_foveation_dynamic>` | ``false`` |
  29. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  30. | :ref:`int<class_int>` | :ref:`foveation_level<class_OpenXRInterface_property_foveation_level>` | ``0`` |
  31. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  32. | :ref:`float<class_float>` | :ref:`render_target_size_multiplier<class_OpenXRInterface_property_render_target_size_multiplier>` | ``1.0`` |
  33. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  34. .. rst-class:: classref-reftable-group
  35. Methods
  36. -------
  37. .. table::
  38. :widths: auto
  39. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`Array<class_Array>` | :ref:`get_action_sets<class_OpenXRInterface_method_get_action_sets>` **(** **)** |const| |
  41. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_OpenXRInterface_method_get_available_display_refresh_rates>` **(** **)** |const| |
  43. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_angular_velocity<class_OpenXRInterface_method_get_hand_joint_angular_velocity>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  45. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | |bitfield|\<:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>`\> | :ref:`get_hand_joint_flags<class_OpenXRInterface_method_get_hand_joint_flags>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  47. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_linear_velocity<class_OpenXRInterface_method_get_hand_joint_linear_velocity>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  49. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_position<class_OpenXRInterface_method_get_hand_joint_position>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  51. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`float<class_float>` | :ref:`get_hand_joint_radius<class_OpenXRInterface_method_get_hand_joint_radius>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  53. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Quaternion<class_Quaternion>` | :ref:`get_hand_joint_rotation<class_OpenXRInterface_method_get_hand_joint_rotation>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  55. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` | :ref:`get_motion_range<class_OpenXRInterface_method_get_motion_range>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand **)** |const| |
  57. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`bool<class_bool>` | :ref:`is_action_set_active<class_OpenXRInterface_method_is_action_set_active>` **(** :ref:`String<class_String>` name **)** |const| |
  59. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`bool<class_bool>` | :ref:`is_eye_gaze_interaction_supported<class_OpenXRInterface_method_is_eye_gaze_interaction_supported>` **(** **)** |
  61. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`is_foveation_supported<class_OpenXRInterface_method_is_foveation_supported>` **(** **)** |const| |
  63. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`bool<class_bool>` | :ref:`is_hand_tracking_supported<class_OpenXRInterface_method_is_hand_tracking_supported>` **(** **)** |
  65. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | void | :ref:`set_action_set_active<class_OpenXRInterface_method_set_action_set_active>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)** |
  67. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | void | :ref:`set_motion_range<class_OpenXRInterface_method_set_motion_range>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` motion_range **)** |
  69. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. .. rst-class:: classref-section-separator
  71. ----
  72. .. rst-class:: classref-descriptions-group
  73. Signals
  74. -------
  75. .. _class_OpenXRInterface_signal_pose_recentered:
  76. .. rst-class:: classref-signal
  77. **pose_recentered** **(** **)**
  78. Informs the user queued a recenter of the player position.
  79. .. rst-class:: classref-item-separator
  80. ----
  81. .. _class_OpenXRInterface_signal_session_begun:
  82. .. rst-class:: classref-signal
  83. **session_begun** **(** **)**
  84. Informs our OpenXR session has been started.
  85. .. rst-class:: classref-item-separator
  86. ----
  87. .. _class_OpenXRInterface_signal_session_focussed:
  88. .. rst-class:: classref-signal
  89. **session_focussed** **(** **)**
  90. Informs our OpenXR session now has focus.
  91. .. rst-class:: classref-item-separator
  92. ----
  93. .. _class_OpenXRInterface_signal_session_stopping:
  94. .. rst-class:: classref-signal
  95. **session_stopping** **(** **)**
  96. Informs our OpenXR session is stopping.
  97. .. rst-class:: classref-item-separator
  98. ----
  99. .. _class_OpenXRInterface_signal_session_visible:
  100. .. rst-class:: classref-signal
  101. **session_visible** **(** **)**
  102. Informs our OpenXR session is now visible (output is being sent to the HMD).
  103. .. rst-class:: classref-section-separator
  104. ----
  105. .. rst-class:: classref-descriptions-group
  106. Enumerations
  107. ------------
  108. .. _enum_OpenXRInterface_Hand:
  109. .. rst-class:: classref-enumeration
  110. enum **Hand**:
  111. .. _class_OpenXRInterface_constant_HAND_LEFT:
  112. .. rst-class:: classref-enumeration-constant
  113. :ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_LEFT** = ``0``
  114. Left hand.
  115. .. _class_OpenXRInterface_constant_HAND_RIGHT:
  116. .. rst-class:: classref-enumeration-constant
  117. :ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_RIGHT** = ``1``
  118. Right hand.
  119. .. _class_OpenXRInterface_constant_HAND_MAX:
  120. .. rst-class:: classref-enumeration-constant
  121. :ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_MAX** = ``2``
  122. Maximum value for the hand enum.
  123. .. rst-class:: classref-item-separator
  124. ----
  125. .. _enum_OpenXRInterface_HandMotionRange:
  126. .. rst-class:: classref-enumeration
  127. enum **HandMotionRange**:
  128. .. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_UNOBSTRUCTED:
  129. .. rst-class:: classref-enumeration-constant
  130. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_UNOBSTRUCTED** = ``0``
  131. .. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER:
  132. .. rst-class:: classref-enumeration-constant
  133. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER** = ``1``
  134. .. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_MAX:
  135. .. rst-class:: classref-enumeration-constant
  136. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_MAX** = ``2``
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _enum_OpenXRInterface_HandJoints:
  140. .. rst-class:: classref-enumeration
  141. enum **HandJoints**:
  142. .. _class_OpenXRInterface_constant_HAND_JOINT_PALM:
  143. .. rst-class:: classref-enumeration-constant
  144. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_PALM** = ``0``
  145. Palm joint.
  146. .. _class_OpenXRInterface_constant_HAND_JOINT_WRIST:
  147. .. rst-class:: classref-enumeration-constant
  148. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_WRIST** = ``1``
  149. Wrist joint.
  150. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_METACARPAL:
  151. .. rst-class:: classref-enumeration-constant
  152. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_METACARPAL** = ``2``
  153. Thumb metacarpal joint.
  154. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_PROXIMAL:
  155. .. rst-class:: classref-enumeration-constant
  156. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_PROXIMAL** = ``3``
  157. Thumb proximal joint.
  158. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_DISTAL:
  159. .. rst-class:: classref-enumeration-constant
  160. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_DISTAL** = ``4``
  161. Thumb distal joint.
  162. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_TIP:
  163. .. rst-class:: classref-enumeration-constant
  164. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_TIP** = ``5``
  165. Thumb tip joint.
  166. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_METACARPAL:
  167. .. rst-class:: classref-enumeration-constant
  168. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_METACARPAL** = ``6``
  169. Index metacarpal joint.
  170. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_PROXIMAL:
  171. .. rst-class:: classref-enumeration-constant
  172. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_PROXIMAL** = ``7``
  173. Index proximal joint.
  174. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_INTERMEDIATE:
  175. .. rst-class:: classref-enumeration-constant
  176. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_INTERMEDIATE** = ``8``
  177. Index intermediate joint.
  178. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_DISTAL:
  179. .. rst-class:: classref-enumeration-constant
  180. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_DISTAL** = ``9``
  181. Index distal joint.
  182. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_TIP:
  183. .. rst-class:: classref-enumeration-constant
  184. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_TIP** = ``10``
  185. Index tip joint.
  186. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_METACARPAL:
  187. .. rst-class:: classref-enumeration-constant
  188. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_METACARPAL** = ``11``
  189. Middle metacarpal joint.
  190. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_PROXIMAL:
  191. .. rst-class:: classref-enumeration-constant
  192. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_PROXIMAL** = ``12``
  193. Middle proximal joint.
  194. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_INTERMEDIATE:
  195. .. rst-class:: classref-enumeration-constant
  196. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_INTERMEDIATE** = ``13``
  197. Middle intermediate joint.
  198. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_DISTAL:
  199. .. rst-class:: classref-enumeration-constant
  200. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_DISTAL** = ``14``
  201. Middle distal joint.
  202. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_TIP:
  203. .. rst-class:: classref-enumeration-constant
  204. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_TIP** = ``15``
  205. Middle tip joint.
  206. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_METACARPAL:
  207. .. rst-class:: classref-enumeration-constant
  208. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_METACARPAL** = ``16``
  209. Ring metacarpal joint.
  210. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_PROXIMAL:
  211. .. rst-class:: classref-enumeration-constant
  212. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_PROXIMAL** = ``17``
  213. Ring proximal joint.
  214. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_INTERMEDIATE:
  215. .. rst-class:: classref-enumeration-constant
  216. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_INTERMEDIATE** = ``18``
  217. Ring intermediate joint.
  218. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_DISTAL:
  219. .. rst-class:: classref-enumeration-constant
  220. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_DISTAL** = ``19``
  221. Ring distal joint.
  222. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_TIP:
  223. .. rst-class:: classref-enumeration-constant
  224. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_TIP** = ``20``
  225. Ring tip joint.
  226. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_METACARPAL:
  227. .. rst-class:: classref-enumeration-constant
  228. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_METACARPAL** = ``21``
  229. Little metacarpal joint.
  230. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_PROXIMAL:
  231. .. rst-class:: classref-enumeration-constant
  232. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_PROXIMAL** = ``22``
  233. Little proximal joint.
  234. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_INTERMEDIATE:
  235. .. rst-class:: classref-enumeration-constant
  236. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_INTERMEDIATE** = ``23``
  237. Little intermediate joint.
  238. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_DISTAL:
  239. .. rst-class:: classref-enumeration-constant
  240. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_DISTAL** = ``24``
  241. Little distal joint.
  242. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_TIP:
  243. .. rst-class:: classref-enumeration-constant
  244. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_TIP** = ``25``
  245. Little tip joint.
  246. .. _class_OpenXRInterface_constant_HAND_JOINT_MAX:
  247. .. rst-class:: classref-enumeration-constant
  248. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MAX** = ``26``
  249. Maximum value for the hand joint enum.
  250. .. rst-class:: classref-item-separator
  251. ----
  252. .. _enum_OpenXRInterface_HandJointFlags:
  253. .. rst-class:: classref-enumeration
  254. flags **HandJointFlags**:
  255. .. _class_OpenXRInterface_constant_HAND_JOINT_NONE:
  256. .. rst-class:: classref-enumeration-constant
  257. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_NONE** = ``0``
  258. No flags are set.
  259. .. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_VALID:
  260. .. rst-class:: classref-enumeration-constant
  261. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ORIENTATION_VALID** = ``1``
  262. If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used.
  263. .. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_TRACKED:
  264. .. rst-class:: classref-enumeration-constant
  265. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ORIENTATION_TRACKED** = ``2``
  266. If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data.
  267. .. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_VALID:
  268. .. rst-class:: classref-enumeration-constant
  269. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_POSITION_VALID** = ``4``
  270. If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used.
  271. .. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_TRACKED:
  272. .. rst-class:: classref-enumeration-constant
  273. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_POSITION_TRACKED** = ``8``
  274. If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data.
  275. .. _class_OpenXRInterface_constant_HAND_JOINT_LINEAR_VELOCITY_VALID:
  276. .. rst-class:: classref-enumeration-constant
  277. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_LINEAR_VELOCITY_VALID** = ``16``
  278. If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used.
  279. .. _class_OpenXRInterface_constant_HAND_JOINT_ANGULAR_VELOCITY_VALID:
  280. .. rst-class:: classref-enumeration-constant
  281. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ANGULAR_VELOCITY_VALID** = ``32``
  282. If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used.
  283. .. rst-class:: classref-section-separator
  284. ----
  285. .. rst-class:: classref-descriptions-group
  286. Property Descriptions
  287. ---------------------
  288. .. _class_OpenXRInterface_property_display_refresh_rate:
  289. .. rst-class:: classref-property
  290. :ref:`float<class_float>` **display_refresh_rate** = ``0.0``
  291. .. rst-class:: classref-property-setget
  292. - void **set_display_refresh_rate** **(** :ref:`float<class_float>` value **)**
  293. - :ref:`float<class_float>` **get_display_refresh_rate** **(** **)**
  294. 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.
  295. .. rst-class:: classref-item-separator
  296. ----
  297. .. _class_OpenXRInterface_property_foveation_dynamic:
  298. .. rst-class:: classref-property
  299. :ref:`bool<class_bool>` **foveation_dynamic** = ``false``
  300. .. rst-class:: classref-property-setget
  301. - void **set_foveation_dynamic** **(** :ref:`bool<class_bool>` value **)**
  302. - :ref:`bool<class_bool>` **get_foveation_dynamic** **(** **)**
  303. Enable dynamic foveation adjustment, the interface must be initialized before this is accessible. If enabled foveation will automatically adjusted between low and :ref:`foveation_level<class_OpenXRInterface_property_foveation_level>`.
  304. .. rst-class:: classref-item-separator
  305. ----
  306. .. _class_OpenXRInterface_property_foveation_level:
  307. .. rst-class:: classref-property
  308. :ref:`int<class_int>` **foveation_level** = ``0``
  309. .. rst-class:: classref-property-setget
  310. - void **set_foveation_level** **(** :ref:`int<class_int>` value **)**
  311. - :ref:`int<class_int>` **get_foveation_level** **(** **)**
  312. Set foveation level from 0 (off) to 3 (high), the interface must be initialized before this is accessible.
  313. .. rst-class:: classref-item-separator
  314. ----
  315. .. _class_OpenXRInterface_property_render_target_size_multiplier:
  316. .. rst-class:: classref-property
  317. :ref:`float<class_float>` **render_target_size_multiplier** = ``1.0``
  318. .. rst-class:: classref-property-setget
  319. - void **set_render_target_size_multiplier** **(** :ref:`float<class_float>` value **)**
  320. - :ref:`float<class_float>` **get_render_target_size_multiplier** **(** **)**
  321. The render size multiplier for the current HMD. Must be set before the interface has been initialized.
  322. .. rst-class:: classref-section-separator
  323. ----
  324. .. rst-class:: classref-descriptions-group
  325. Method Descriptions
  326. -------------------
  327. .. _class_OpenXRInterface_method_get_action_sets:
  328. .. rst-class:: classref-method
  329. :ref:`Array<class_Array>` **get_action_sets** **(** **)** |const|
  330. Returns a list of action sets registered with Godot (loaded from the action map at runtime).
  331. .. rst-class:: classref-item-separator
  332. ----
  333. .. _class_OpenXRInterface_method_get_available_display_refresh_rates:
  334. .. rst-class:: classref-method
  335. :ref:`Array<class_Array>` **get_available_display_refresh_rates** **(** **)** |const|
  336. 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.
  337. .. rst-class:: classref-item-separator
  338. ----
  339. .. _class_OpenXRInterface_method_get_hand_joint_angular_velocity:
  340. .. rst-class:: classref-method
  341. :ref:`Vector3<class_Vector3>` **get_hand_joint_angular_velocity** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  342. If handtracking is enabled, returns the angular velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D<class_XROrigin3D>`!
  343. .. rst-class:: classref-item-separator
  344. ----
  345. .. _class_OpenXRInterface_method_get_hand_joint_flags:
  346. .. rst-class:: classref-method
  347. |bitfield|\<:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>`\> **get_hand_joint_flags** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  348. If handtracking is enabled, returns flags that inform us of the validity of the tracking data.
  349. .. rst-class:: classref-item-separator
  350. ----
  351. .. _class_OpenXRInterface_method_get_hand_joint_linear_velocity:
  352. .. rst-class:: classref-method
  353. :ref:`Vector3<class_Vector3>` **get_hand_joint_linear_velocity** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  354. If handtracking is enabled, returns the linear velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D<class_XROrigin3D>` without worldscale applied!
  355. .. rst-class:: classref-item-separator
  356. ----
  357. .. _class_OpenXRInterface_method_get_hand_joint_position:
  358. .. rst-class:: classref-method
  359. :ref:`Vector3<class_Vector3>` **get_hand_joint_position** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  360. If handtracking is enabled, returns the position of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D<class_XROrigin3D>` without worldscale applied!
  361. .. rst-class:: classref-item-separator
  362. ----
  363. .. _class_OpenXRInterface_method_get_hand_joint_radius:
  364. .. rst-class:: classref-method
  365. :ref:`float<class_float>` **get_hand_joint_radius** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  366. If handtracking is enabled, returns the radius of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is without worldscale applied!
  367. .. rst-class:: classref-item-separator
  368. ----
  369. .. _class_OpenXRInterface_method_get_hand_joint_rotation:
  370. .. rst-class:: classref-method
  371. :ref:`Quaternion<class_Quaternion>` **get_hand_joint_rotation** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  372. If handtracking is enabled, returns the rotation of a joint (``joint``) of a hand (``hand``) as provided by OpenXR.
  373. .. rst-class:: classref-item-separator
  374. ----
  375. .. _class_OpenXRInterface_method_get_motion_range:
  376. .. rst-class:: classref-method
  377. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **get_motion_range** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand **)** |const|
  378. If handtracking is enabled and motion range is supported, gets the currently configured motion range for ``hand``.
  379. .. rst-class:: classref-item-separator
  380. ----
  381. .. _class_OpenXRInterface_method_is_action_set_active:
  382. .. rst-class:: classref-method
  383. :ref:`bool<class_bool>` **is_action_set_active** **(** :ref:`String<class_String>` name **)** |const|
  384. Returns ``true`` if the given action set is active.
  385. .. rst-class:: classref-item-separator
  386. ----
  387. .. _class_OpenXRInterface_method_is_eye_gaze_interaction_supported:
  388. .. rst-class:: classref-method
  389. :ref:`bool<class_bool>` **is_eye_gaze_interaction_supported** **(** **)**
  390. Returns the capabilities of the eye gaze interaction extension.
  391. \ **Note:** This only returns a valid value after OpenXR has been initialized.
  392. .. rst-class:: classref-item-separator
  393. ----
  394. .. _class_OpenXRInterface_method_is_foveation_supported:
  395. .. rst-class:: classref-method
  396. :ref:`bool<class_bool>` **is_foveation_supported** **(** **)** |const|
  397. Returns ``true`` if OpenXR's foveation extension is supported, the interface must be initialized before this returns a valid value.
  398. \ **Note:** This feature is only available on the compatibility renderer and currently only available on some stand alone headsets. For Vulkan set :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to ``VRS_XR`` on desktop.
  399. .. rst-class:: classref-item-separator
  400. ----
  401. .. _class_OpenXRInterface_method_is_hand_tracking_supported:
  402. .. rst-class:: classref-method
  403. :ref:`bool<class_bool>` **is_hand_tracking_supported** **(** **)**
  404. Returns ``true`` if OpenXR's hand tracking is supported and enabled.
  405. \ **Note:** This only returns a valid value after OpenXR has been initialized.
  406. .. rst-class:: classref-item-separator
  407. ----
  408. .. _class_OpenXRInterface_method_set_action_set_active:
  409. .. rst-class:: classref-method
  410. void **set_action_set_active** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)**
  411. Sets the given action set as active or inactive.
  412. .. rst-class:: classref-item-separator
  413. ----
  414. .. _class_OpenXRInterface_method_set_motion_range:
  415. .. rst-class:: classref-method
  416. void **set_motion_range** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` motion_range **)**
  417. If handtracking is enabled and motion range is supported, sets the currently configured motion range for ``hand`` to ``motion_range``.
  418. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  419. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  420. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  421. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  422. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  423. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  424. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`