class_openxrinterface.rst 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  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. | :ref:`float<class_float>` | :ref:`vrs_min_radius<class_OpenXRInterface_property_vrs_min_radius>` | ``20.0`` |
  35. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  36. | :ref:`float<class_float>` | :ref:`vrs_strength<class_OpenXRInterface_property_vrs_strength>` | ``1.0`` |
  37. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  38. .. rst-class:: classref-reftable-group
  39. Methods
  40. -------
  41. .. table::
  42. :widths: auto
  43. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`Array<class_Array>` | :ref:`get_action_sets<class_OpenXRInterface_method_get_action_sets>`\ (\ ) |const| |
  45. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_OpenXRInterface_method_get_available_display_refresh_rates>`\ (\ ) |const| |
  47. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_angular_velocity<class_OpenXRInterface_method_get_hand_joint_angular_velocity>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| |
  49. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | |bitfield|\[:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>`\] | :ref:`get_hand_joint_flags<class_OpenXRInterface_method_get_hand_joint_flags>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| |
  51. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_linear_velocity<class_OpenXRInterface_method_get_hand_joint_linear_velocity>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| |
  53. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_position<class_OpenXRInterface_method_get_hand_joint_position>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| |
  55. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`float<class_float>` | :ref:`get_hand_joint_radius<class_OpenXRInterface_method_get_hand_joint_radius>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| |
  57. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`Quaternion<class_Quaternion>` | :ref:`get_hand_joint_rotation<class_OpenXRInterface_method_get_hand_joint_rotation>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| |
  59. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` | :ref:`get_hand_tracking_source<class_OpenXRInterface_method_get_hand_tracking_source>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`\ ) |const| |
  61. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` | :ref:`get_motion_range<class_OpenXRInterface_method_get_motion_range>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`\ ) |const| |
  63. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`bool<class_bool>` | :ref:`is_action_set_active<class_OpenXRInterface_method_is_action_set_active>`\ (\ name\: :ref:`String<class_String>`\ ) |const| |
  65. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`bool<class_bool>` | :ref:`is_eye_gaze_interaction_supported<class_OpenXRInterface_method_is_eye_gaze_interaction_supported>`\ (\ ) |
  67. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`bool<class_bool>` | :ref:`is_foveation_supported<class_OpenXRInterface_method_is_foveation_supported>`\ (\ ) |const| |
  69. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`bool<class_bool>` | :ref:`is_hand_interaction_supported<class_OpenXRInterface_method_is_hand_interaction_supported>`\ (\ ) |const| |
  71. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`bool<class_bool>` | :ref:`is_hand_tracking_supported<class_OpenXRInterface_method_is_hand_tracking_supported>`\ (\ ) |
  73. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | |void| | :ref:`set_action_set_active<class_OpenXRInterface_method_set_action_set_active>`\ (\ name\: :ref:`String<class_String>`, active\: :ref:`bool<class_bool>`\ ) |
  75. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | |void| | :ref:`set_motion_range<class_OpenXRInterface_method_set_motion_range>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, motion_range\: :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>`\ ) |
  77. +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. .. rst-class:: classref-section-separator
  79. ----
  80. .. rst-class:: classref-descriptions-group
  81. Signals
  82. -------
  83. .. _class_OpenXRInterface_signal_instance_exiting:
  84. .. rst-class:: classref-signal
  85. **instance_exiting**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_instance_exiting>`
  86. Informs our OpenXR instance is exiting.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_OpenXRInterface_signal_pose_recentered:
  90. .. rst-class:: classref-signal
  91. **pose_recentered**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_pose_recentered>`
  92. Informs the user queued a recenter of the player position.
  93. .. rst-class:: classref-item-separator
  94. ----
  95. .. _class_OpenXRInterface_signal_refresh_rate_changed:
  96. .. rst-class:: classref-signal
  97. **refresh_rate_changed**\ (\ refresh_rate\: :ref:`float<class_float>`\ ) :ref:`🔗<class_OpenXRInterface_signal_refresh_rate_changed>`
  98. Informs the user the HMD refresh rate has changed.
  99. \ **Note:** Only emitted if XR runtime supports the refresh rate extension.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_OpenXRInterface_signal_session_begun:
  103. .. rst-class:: classref-signal
  104. **session_begun**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_begun>`
  105. Informs our OpenXR session has been started.
  106. .. rst-class:: classref-item-separator
  107. ----
  108. .. _class_OpenXRInterface_signal_session_focussed:
  109. .. rst-class:: classref-signal
  110. **session_focussed**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_focussed>`
  111. Informs our OpenXR session now has focus.
  112. .. rst-class:: classref-item-separator
  113. ----
  114. .. _class_OpenXRInterface_signal_session_loss_pending:
  115. .. rst-class:: classref-signal
  116. **session_loss_pending**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_loss_pending>`
  117. Informs our OpenXR session is in the process of being lost.
  118. .. rst-class:: classref-item-separator
  119. ----
  120. .. _class_OpenXRInterface_signal_session_stopping:
  121. .. rst-class:: classref-signal
  122. **session_stopping**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_stopping>`
  123. Informs our OpenXR session is stopping.
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_OpenXRInterface_signal_session_visible:
  127. .. rst-class:: classref-signal
  128. **session_visible**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_visible>`
  129. Informs our OpenXR session is now visible (output is being sent to the HMD).
  130. .. rst-class:: classref-section-separator
  131. ----
  132. .. rst-class:: classref-descriptions-group
  133. Enumerations
  134. ------------
  135. .. _enum_OpenXRInterface_Hand:
  136. .. rst-class:: classref-enumeration
  137. enum **Hand**: :ref:`🔗<enum_OpenXRInterface_Hand>`
  138. .. _class_OpenXRInterface_constant_HAND_LEFT:
  139. .. rst-class:: classref-enumeration-constant
  140. :ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_LEFT** = ``0``
  141. Left hand.
  142. .. _class_OpenXRInterface_constant_HAND_RIGHT:
  143. .. rst-class:: classref-enumeration-constant
  144. :ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_RIGHT** = ``1``
  145. Right hand.
  146. .. _class_OpenXRInterface_constant_HAND_MAX:
  147. .. rst-class:: classref-enumeration-constant
  148. :ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_MAX** = ``2``
  149. Maximum value for the hand enum.
  150. .. rst-class:: classref-item-separator
  151. ----
  152. .. _enum_OpenXRInterface_HandMotionRange:
  153. .. rst-class:: classref-enumeration
  154. enum **HandMotionRange**: :ref:`🔗<enum_OpenXRInterface_HandMotionRange>`
  155. .. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_UNOBSTRUCTED:
  156. .. rst-class:: classref-enumeration-constant
  157. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_UNOBSTRUCTED** = ``0``
  158. Full hand range, if user closes their hands, we make a full fist.
  159. .. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER:
  160. .. rst-class:: classref-enumeration-constant
  161. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER** = ``1``
  162. Conform to controller, if user closes their hands, the tracked data conforms to the shape of the controller.
  163. .. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_MAX:
  164. .. rst-class:: classref-enumeration-constant
  165. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_MAX** = ``2``
  166. Maximum value for the motion range enum.
  167. .. rst-class:: classref-item-separator
  168. ----
  169. .. _enum_OpenXRInterface_HandTrackedSource:
  170. .. rst-class:: classref-enumeration
  171. enum **HandTrackedSource**: :ref:`🔗<enum_OpenXRInterface_HandTrackedSource>`
  172. .. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_UNKNOWN:
  173. .. rst-class:: classref-enumeration-constant
  174. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_UNKNOWN** = ``0``
  175. The source of hand tracking data is unknown (the extension is likely unsupported).
  176. .. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_UNOBSTRUCTED:
  177. .. rst-class:: classref-enumeration-constant
  178. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_UNOBSTRUCTED** = ``1``
  179. The source of hand tracking is unobstructed, this means that an accurate method of hand tracking is used, e.g. optical hand tracking, data gloves, etc.
  180. .. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_CONTROLLER:
  181. .. rst-class:: classref-enumeration-constant
  182. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_CONTROLLER** = ``2``
  183. The source of hand tracking is a controller, bone positions are inferred from controller inputs.
  184. .. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_MAX:
  185. .. rst-class:: classref-enumeration-constant
  186. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_MAX** = ``3``
  187. Maximum value for the hand tracked source enum.
  188. .. rst-class:: classref-item-separator
  189. ----
  190. .. _enum_OpenXRInterface_HandJoints:
  191. .. rst-class:: classref-enumeration
  192. enum **HandJoints**: :ref:`🔗<enum_OpenXRInterface_HandJoints>`
  193. .. _class_OpenXRInterface_constant_HAND_JOINT_PALM:
  194. .. rst-class:: classref-enumeration-constant
  195. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_PALM** = ``0``
  196. Palm joint.
  197. .. _class_OpenXRInterface_constant_HAND_JOINT_WRIST:
  198. .. rst-class:: classref-enumeration-constant
  199. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_WRIST** = ``1``
  200. Wrist joint.
  201. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_METACARPAL:
  202. .. rst-class:: classref-enumeration-constant
  203. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_METACARPAL** = ``2``
  204. Thumb metacarpal joint.
  205. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_PROXIMAL:
  206. .. rst-class:: classref-enumeration-constant
  207. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_PROXIMAL** = ``3``
  208. Thumb proximal joint.
  209. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_DISTAL:
  210. .. rst-class:: classref-enumeration-constant
  211. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_DISTAL** = ``4``
  212. Thumb distal joint.
  213. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_TIP:
  214. .. rst-class:: classref-enumeration-constant
  215. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_TIP** = ``5``
  216. Thumb tip joint.
  217. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_METACARPAL:
  218. .. rst-class:: classref-enumeration-constant
  219. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_METACARPAL** = ``6``
  220. Index metacarpal joint.
  221. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_PROXIMAL:
  222. .. rst-class:: classref-enumeration-constant
  223. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_PROXIMAL** = ``7``
  224. Index proximal joint.
  225. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_INTERMEDIATE:
  226. .. rst-class:: classref-enumeration-constant
  227. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_INTERMEDIATE** = ``8``
  228. Index intermediate joint.
  229. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_DISTAL:
  230. .. rst-class:: classref-enumeration-constant
  231. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_DISTAL** = ``9``
  232. Index distal joint.
  233. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_TIP:
  234. .. rst-class:: classref-enumeration-constant
  235. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_TIP** = ``10``
  236. Index tip joint.
  237. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_METACARPAL:
  238. .. rst-class:: classref-enumeration-constant
  239. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_METACARPAL** = ``11``
  240. Middle metacarpal joint.
  241. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_PROXIMAL:
  242. .. rst-class:: classref-enumeration-constant
  243. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_PROXIMAL** = ``12``
  244. Middle proximal joint.
  245. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_INTERMEDIATE:
  246. .. rst-class:: classref-enumeration-constant
  247. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_INTERMEDIATE** = ``13``
  248. Middle intermediate joint.
  249. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_DISTAL:
  250. .. rst-class:: classref-enumeration-constant
  251. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_DISTAL** = ``14``
  252. Middle distal joint.
  253. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_TIP:
  254. .. rst-class:: classref-enumeration-constant
  255. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_TIP** = ``15``
  256. Middle tip joint.
  257. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_METACARPAL:
  258. .. rst-class:: classref-enumeration-constant
  259. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_METACARPAL** = ``16``
  260. Ring metacarpal joint.
  261. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_PROXIMAL:
  262. .. rst-class:: classref-enumeration-constant
  263. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_PROXIMAL** = ``17``
  264. Ring proximal joint.
  265. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_INTERMEDIATE:
  266. .. rst-class:: classref-enumeration-constant
  267. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_INTERMEDIATE** = ``18``
  268. Ring intermediate joint.
  269. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_DISTAL:
  270. .. rst-class:: classref-enumeration-constant
  271. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_DISTAL** = ``19``
  272. Ring distal joint.
  273. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_TIP:
  274. .. rst-class:: classref-enumeration-constant
  275. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_TIP** = ``20``
  276. Ring tip joint.
  277. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_METACARPAL:
  278. .. rst-class:: classref-enumeration-constant
  279. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_METACARPAL** = ``21``
  280. Little metacarpal joint.
  281. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_PROXIMAL:
  282. .. rst-class:: classref-enumeration-constant
  283. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_PROXIMAL** = ``22``
  284. Little proximal joint.
  285. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_INTERMEDIATE:
  286. .. rst-class:: classref-enumeration-constant
  287. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_INTERMEDIATE** = ``23``
  288. Little intermediate joint.
  289. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_DISTAL:
  290. .. rst-class:: classref-enumeration-constant
  291. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_DISTAL** = ``24``
  292. Little distal joint.
  293. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_TIP:
  294. .. rst-class:: classref-enumeration-constant
  295. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_TIP** = ``25``
  296. Little tip joint.
  297. .. _class_OpenXRInterface_constant_HAND_JOINT_MAX:
  298. .. rst-class:: classref-enumeration-constant
  299. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MAX** = ``26``
  300. Maximum value for the hand joint enum.
  301. .. rst-class:: classref-item-separator
  302. ----
  303. .. _enum_OpenXRInterface_HandJointFlags:
  304. .. rst-class:: classref-enumeration
  305. flags **HandJointFlags**: :ref:`🔗<enum_OpenXRInterface_HandJointFlags>`
  306. .. _class_OpenXRInterface_constant_HAND_JOINT_NONE:
  307. .. rst-class:: classref-enumeration-constant
  308. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_NONE** = ``0``
  309. No flags are set.
  310. .. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_VALID:
  311. .. rst-class:: classref-enumeration-constant
  312. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ORIENTATION_VALID** = ``1``
  313. If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used.
  314. .. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_TRACKED:
  315. .. rst-class:: classref-enumeration-constant
  316. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ORIENTATION_TRACKED** = ``2``
  317. If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data.
  318. .. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_VALID:
  319. .. rst-class:: classref-enumeration-constant
  320. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_POSITION_VALID** = ``4``
  321. If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used.
  322. .. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_TRACKED:
  323. .. rst-class:: classref-enumeration-constant
  324. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_POSITION_TRACKED** = ``8``
  325. If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data.
  326. .. _class_OpenXRInterface_constant_HAND_JOINT_LINEAR_VELOCITY_VALID:
  327. .. rst-class:: classref-enumeration-constant
  328. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_LINEAR_VELOCITY_VALID** = ``16``
  329. If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used.
  330. .. _class_OpenXRInterface_constant_HAND_JOINT_ANGULAR_VELOCITY_VALID:
  331. .. rst-class:: classref-enumeration-constant
  332. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ANGULAR_VELOCITY_VALID** = ``32``
  333. If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used.
  334. .. rst-class:: classref-section-separator
  335. ----
  336. .. rst-class:: classref-descriptions-group
  337. Property Descriptions
  338. ---------------------
  339. .. _class_OpenXRInterface_property_display_refresh_rate:
  340. .. rst-class:: classref-property
  341. :ref:`float<class_float>` **display_refresh_rate** = ``0.0`` :ref:`🔗<class_OpenXRInterface_property_display_refresh_rate>`
  342. .. rst-class:: classref-property-setget
  343. - |void| **set_display_refresh_rate**\ (\ value\: :ref:`float<class_float>`\ )
  344. - :ref:`float<class_float>` **get_display_refresh_rate**\ (\ )
  345. 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.
  346. .. rst-class:: classref-item-separator
  347. ----
  348. .. _class_OpenXRInterface_property_foveation_dynamic:
  349. .. rst-class:: classref-property
  350. :ref:`bool<class_bool>` **foveation_dynamic** = ``false`` :ref:`🔗<class_OpenXRInterface_property_foveation_dynamic>`
  351. .. rst-class:: classref-property-setget
  352. - |void| **set_foveation_dynamic**\ (\ value\: :ref:`bool<class_bool>`\ )
  353. - :ref:`bool<class_bool>` **get_foveation_dynamic**\ (\ )
  354. 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>`.
  355. \ **Note:** Only works on compatibility renderer.
  356. .. rst-class:: classref-item-separator
  357. ----
  358. .. _class_OpenXRInterface_property_foveation_level:
  359. .. rst-class:: classref-property
  360. :ref:`int<class_int>` **foveation_level** = ``0`` :ref:`🔗<class_OpenXRInterface_property_foveation_level>`
  361. .. rst-class:: classref-property-setget
  362. - |void| **set_foveation_level**\ (\ value\: :ref:`int<class_int>`\ )
  363. - :ref:`int<class_int>` **get_foveation_level**\ (\ )
  364. Set foveation level from 0 (off) to 3 (high), the interface must be initialized before this is accessible.
  365. \ **Note:** Only works on compatibility renderer.
  366. .. rst-class:: classref-item-separator
  367. ----
  368. .. _class_OpenXRInterface_property_render_target_size_multiplier:
  369. .. rst-class:: classref-property
  370. :ref:`float<class_float>` **render_target_size_multiplier** = ``1.0`` :ref:`🔗<class_OpenXRInterface_property_render_target_size_multiplier>`
  371. .. rst-class:: classref-property-setget
  372. - |void| **set_render_target_size_multiplier**\ (\ value\: :ref:`float<class_float>`\ )
  373. - :ref:`float<class_float>` **get_render_target_size_multiplier**\ (\ )
  374. The render size multiplier for the current HMD. Must be set before the interface has been initialized.
  375. .. rst-class:: classref-item-separator
  376. ----
  377. .. _class_OpenXRInterface_property_vrs_min_radius:
  378. .. rst-class:: classref-property
  379. :ref:`float<class_float>` **vrs_min_radius** = ``20.0`` :ref:`🔗<class_OpenXRInterface_property_vrs_min_radius>`
  380. .. rst-class:: classref-property-setget
  381. - |void| **set_vrs_min_radius**\ (\ value\: :ref:`float<class_float>`\ )
  382. - :ref:`float<class_float>` **get_vrs_min_radius**\ (\ )
  383. The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size.
  384. \ **Note:** Mobile and Forward+ renderers only. Requires :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to be set to :ref:`Viewport.VRS_XR<class_Viewport_constant_VRS_XR>`.
  385. .. rst-class:: classref-item-separator
  386. ----
  387. .. _class_OpenXRInterface_property_vrs_strength:
  388. .. rst-class:: classref-property
  389. :ref:`float<class_float>` **vrs_strength** = ``1.0`` :ref:`🔗<class_OpenXRInterface_property_vrs_strength>`
  390. .. rst-class:: classref-property-setget
  391. - |void| **set_vrs_strength**\ (\ value\: :ref:`float<class_float>`\ )
  392. - :ref:`float<class_float>` **get_vrs_strength**\ (\ )
  393. The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality.
  394. \ **Note:** Mobile and Forward+ renderers only. Requires :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to be set to :ref:`Viewport.VRS_XR<class_Viewport_constant_VRS_XR>`.
  395. .. rst-class:: classref-section-separator
  396. ----
  397. .. rst-class:: classref-descriptions-group
  398. Method Descriptions
  399. -------------------
  400. .. _class_OpenXRInterface_method_get_action_sets:
  401. .. rst-class:: classref-method
  402. :ref:`Array<class_Array>` **get_action_sets**\ (\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_action_sets>`
  403. Returns a list of action sets registered with Godot (loaded from the action map at runtime).
  404. .. rst-class:: classref-item-separator
  405. ----
  406. .. _class_OpenXRInterface_method_get_available_display_refresh_rates:
  407. .. rst-class:: classref-method
  408. :ref:`Array<class_Array>` **get_available_display_refresh_rates**\ (\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_available_display_refresh_rates>`
  409. 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.
  410. .. rst-class:: classref-item-separator
  411. ----
  412. .. _class_OpenXRInterface_method_get_hand_joint_angular_velocity:
  413. .. rst-class:: classref-method
  414. :ref:`Vector3<class_Vector3>` **get_hand_joint_angular_velocity**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_angular_velocity>`
  415. **Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_angular_velocity<class_XRHandTracker_method_get_hand_joint_angular_velocity>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead.
  416. 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>`!
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_OpenXRInterface_method_get_hand_joint_flags:
  420. .. rst-class:: classref-method
  421. |bitfield|\[:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>`\] **get_hand_joint_flags**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_flags>`
  422. **Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_flags<class_XRHandTracker_method_get_hand_joint_flags>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead.
  423. If handtracking is enabled, returns flags that inform us of the validity of the tracking data.
  424. .. rst-class:: classref-item-separator
  425. ----
  426. .. _class_OpenXRInterface_method_get_hand_joint_linear_velocity:
  427. .. rst-class:: classref-method
  428. :ref:`Vector3<class_Vector3>` **get_hand_joint_linear_velocity**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_linear_velocity>`
  429. **Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_linear_velocity<class_XRHandTracker_method_get_hand_joint_linear_velocity>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead.
  430. 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!
  431. .. rst-class:: classref-item-separator
  432. ----
  433. .. _class_OpenXRInterface_method_get_hand_joint_position:
  434. .. rst-class:: classref-method
  435. :ref:`Vector3<class_Vector3>` **get_hand_joint_position**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_position>`
  436. **Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_transform<class_XRHandTracker_method_get_hand_joint_transform>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead.
  437. 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!
  438. .. rst-class:: classref-item-separator
  439. ----
  440. .. _class_OpenXRInterface_method_get_hand_joint_radius:
  441. .. rst-class:: classref-method
  442. :ref:`float<class_float>` **get_hand_joint_radius**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_radius>`
  443. **Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_radius<class_XRHandTracker_method_get_hand_joint_radius>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead.
  444. If handtracking is enabled, returns the radius of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is without worldscale applied!
  445. .. rst-class:: classref-item-separator
  446. ----
  447. .. _class_OpenXRInterface_method_get_hand_joint_rotation:
  448. .. rst-class:: classref-method
  449. :ref:`Quaternion<class_Quaternion>` **get_hand_joint_rotation**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_rotation>`
  450. **Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_transform<class_XRHandTracker_method_get_hand_joint_transform>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead.
  451. If handtracking is enabled, returns the rotation of a joint (``joint``) of a hand (``hand``) as provided by OpenXR.
  452. .. rst-class:: classref-item-separator
  453. ----
  454. .. _class_OpenXRInterface_method_get_hand_tracking_source:
  455. .. rst-class:: classref-method
  456. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **get_hand_tracking_source**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_tracking_source>`
  457. **Deprecated:** Use :ref:`XRHandTracker.hand_tracking_source<class_XRHandTracker_property_hand_tracking_source>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead.
  458. If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for ``hand``.
  459. .. rst-class:: classref-item-separator
  460. ----
  461. .. _class_OpenXRInterface_method_get_motion_range:
  462. .. rst-class:: classref-method
  463. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **get_motion_range**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_motion_range>`
  464. If handtracking is enabled and motion range is supported, gets the currently configured motion range for ``hand``.
  465. .. rst-class:: classref-item-separator
  466. ----
  467. .. _class_OpenXRInterface_method_is_action_set_active:
  468. .. rst-class:: classref-method
  469. :ref:`bool<class_bool>` **is_action_set_active**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_is_action_set_active>`
  470. Returns ``true`` if the given action set is active.
  471. .. rst-class:: classref-item-separator
  472. ----
  473. .. _class_OpenXRInterface_method_is_eye_gaze_interaction_supported:
  474. .. rst-class:: classref-method
  475. :ref:`bool<class_bool>` **is_eye_gaze_interaction_supported**\ (\ ) :ref:`🔗<class_OpenXRInterface_method_is_eye_gaze_interaction_supported>`
  476. Returns the capabilities of the eye gaze interaction extension.
  477. \ **Note:** This only returns a valid value after OpenXR has been initialized.
  478. .. rst-class:: classref-item-separator
  479. ----
  480. .. _class_OpenXRInterface_method_is_foveation_supported:
  481. .. rst-class:: classref-method
  482. :ref:`bool<class_bool>` **is_foveation_supported**\ (\ ) |const| :ref:`🔗<class_OpenXRInterface_method_is_foveation_supported>`
  483. Returns ``true`` if OpenXR's foveation extension is supported, the interface must be initialized before this returns a valid value.
  484. \ **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.
  485. .. rst-class:: classref-item-separator
  486. ----
  487. .. _class_OpenXRInterface_method_is_hand_interaction_supported:
  488. .. rst-class:: classref-method
  489. :ref:`bool<class_bool>` **is_hand_interaction_supported**\ (\ ) |const| :ref:`🔗<class_OpenXRInterface_method_is_hand_interaction_supported>`
  490. Returns ``true`` if OpenXR's hand interaction profile is supported and enabled.
  491. \ **Note:** This only returns a valid value after OpenXR has been initialized.
  492. .. rst-class:: classref-item-separator
  493. ----
  494. .. _class_OpenXRInterface_method_is_hand_tracking_supported:
  495. .. rst-class:: classref-method
  496. :ref:`bool<class_bool>` **is_hand_tracking_supported**\ (\ ) :ref:`🔗<class_OpenXRInterface_method_is_hand_tracking_supported>`
  497. Returns ``true`` if OpenXR's hand tracking is supported and enabled.
  498. \ **Note:** This only returns a valid value after OpenXR has been initialized.
  499. .. rst-class:: classref-item-separator
  500. ----
  501. .. _class_OpenXRInterface_method_set_action_set_active:
  502. .. rst-class:: classref-method
  503. |void| **set_action_set_active**\ (\ name\: :ref:`String<class_String>`, active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_OpenXRInterface_method_set_action_set_active>`
  504. Sets the given action set as active or inactive.
  505. .. rst-class:: classref-item-separator
  506. ----
  507. .. _class_OpenXRInterface_method_set_motion_range:
  508. .. rst-class:: classref-method
  509. |void| **set_motion_range**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, motion_range\: :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>`\ ) :ref:`🔗<class_OpenXRInterface_method_set_motion_range>`
  510. If handtracking is enabled and motion range is supported, sets the currently configured motion range for ``hand`` to ``motion_range``.
  511. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  512. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  513. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  514. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  515. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  516. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  517. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  518. .. |void| replace:: :abbr:`void (No return value.)`