class_openxrhand.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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/OpenXRHand.xml.
  6. .. _class_OpenXRHand:
  7. OpenXRHand
  8. ==========
  9. **Deprecated:** Use :ref:`XRHandModifier3D<class_XRHandModifier3D>` instead.
  10. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  11. Node supporting hand and finger tracking in OpenXR.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. This node enables OpenXR's hand tracking functionality. The node should be a child node of an :ref:`XROrigin3D<class_XROrigin3D>` node, tracking will update its position to the player's tracked hand Palm joint location (the center of the middle finger's metacarpal bone). This node also updates the skeleton of a properly skinned hand or avatar model.
  16. If the skeleton is a hand (one of the hand bones is the root node of the skeleton), then the skeleton will be placed relative to the hand palm location and the hand mesh and skeleton should be children of the OpenXRHand node.
  17. If the hand bones are part of a full skeleton, then the root of the hand will keep its location with the assumption that IK is used to position the hand and arm.
  18. By default the skeleton hand bones are repositioned to match the size of the tracked hand. To preserve the modeled bone sizes change :ref:`bone_update<class_OpenXRHand_property_bone_update>` to apply rotation only.
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +-------------------------------------------------+---------------------------------------------------------------+------------------+
  25. | :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` | :ref:`bone_update<class_OpenXRHand_property_bone_update>` | ``0`` |
  26. +-------------------------------------------------+---------------------------------------------------------------+------------------+
  27. | :ref:`Hands<enum_OpenXRHand_Hands>` | :ref:`hand<class_OpenXRHand_property_hand>` | ``0`` |
  28. +-------------------------------------------------+---------------------------------------------------------------+------------------+
  29. | :ref:`NodePath<class_NodePath>` | :ref:`hand_skeleton<class_OpenXRHand_property_hand_skeleton>` | ``NodePath("")`` |
  30. +-------------------------------------------------+---------------------------------------------------------------+------------------+
  31. | :ref:`MotionRange<enum_OpenXRHand_MotionRange>` | :ref:`motion_range<class_OpenXRHand_property_motion_range>` | ``0`` |
  32. +-------------------------------------------------+---------------------------------------------------------------+------------------+
  33. | :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` | :ref:`skeleton_rig<class_OpenXRHand_property_skeleton_rig>` | ``0`` |
  34. +-------------------------------------------------+---------------------------------------------------------------+------------------+
  35. .. rst-class:: classref-section-separator
  36. ----
  37. .. rst-class:: classref-descriptions-group
  38. Enumerations
  39. ------------
  40. .. _enum_OpenXRHand_Hands:
  41. .. rst-class:: classref-enumeration
  42. enum **Hands**: :ref:`🔗<enum_OpenXRHand_Hands>`
  43. .. _class_OpenXRHand_constant_HAND_LEFT:
  44. .. rst-class:: classref-enumeration-constant
  45. :ref:`Hands<enum_OpenXRHand_Hands>` **HAND_LEFT** = ``0``
  46. Tracking the player's left hand.
  47. .. _class_OpenXRHand_constant_HAND_RIGHT:
  48. .. rst-class:: classref-enumeration-constant
  49. :ref:`Hands<enum_OpenXRHand_Hands>` **HAND_RIGHT** = ``1``
  50. Tracking the player's right hand.
  51. .. _class_OpenXRHand_constant_HAND_MAX:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`Hands<enum_OpenXRHand_Hands>` **HAND_MAX** = ``2``
  54. Maximum supported hands.
  55. .. rst-class:: classref-item-separator
  56. ----
  57. .. _enum_OpenXRHand_MotionRange:
  58. .. rst-class:: classref-enumeration
  59. enum **MotionRange**: :ref:`🔗<enum_OpenXRHand_MotionRange>`
  60. .. _class_OpenXRHand_constant_MOTION_RANGE_UNOBSTRUCTED:
  61. .. rst-class:: classref-enumeration-constant
  62. :ref:`MotionRange<enum_OpenXRHand_MotionRange>` **MOTION_RANGE_UNOBSTRUCTED** = ``0``
  63. When player grips, hand skeleton will form a full fist.
  64. .. _class_OpenXRHand_constant_MOTION_RANGE_CONFORM_TO_CONTROLLER:
  65. .. rst-class:: classref-enumeration-constant
  66. :ref:`MotionRange<enum_OpenXRHand_MotionRange>` **MOTION_RANGE_CONFORM_TO_CONTROLLER** = ``1``
  67. When player grips, hand skeleton conforms to the controller the player is holding.
  68. .. _class_OpenXRHand_constant_MOTION_RANGE_MAX:
  69. .. rst-class:: classref-enumeration-constant
  70. :ref:`MotionRange<enum_OpenXRHand_MotionRange>` **MOTION_RANGE_MAX** = ``2``
  71. Maximum supported motion ranges.
  72. .. rst-class:: classref-item-separator
  73. ----
  74. .. _enum_OpenXRHand_SkeletonRig:
  75. .. rst-class:: classref-enumeration
  76. enum **SkeletonRig**: :ref:`🔗<enum_OpenXRHand_SkeletonRig>`
  77. .. _class_OpenXRHand_constant_SKELETON_RIG_OPENXR:
  78. .. rst-class:: classref-enumeration-constant
  79. :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **SKELETON_RIG_OPENXR** = ``0``
  80. An OpenXR compliant skeleton.
  81. .. _class_OpenXRHand_constant_SKELETON_RIG_HUMANOID:
  82. .. rst-class:: classref-enumeration-constant
  83. :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **SKELETON_RIG_HUMANOID** = ``1``
  84. A :ref:`SkeletonProfileHumanoid<class_SkeletonProfileHumanoid>` compliant skeleton.
  85. .. _class_OpenXRHand_constant_SKELETON_RIG_MAX:
  86. .. rst-class:: classref-enumeration-constant
  87. :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **SKELETON_RIG_MAX** = ``2``
  88. Maximum supported hands.
  89. .. rst-class:: classref-item-separator
  90. ----
  91. .. _enum_OpenXRHand_BoneUpdate:
  92. .. rst-class:: classref-enumeration
  93. enum **BoneUpdate**: :ref:`🔗<enum_OpenXRHand_BoneUpdate>`
  94. .. _class_OpenXRHand_constant_BONE_UPDATE_FULL:
  95. .. rst-class:: classref-enumeration-constant
  96. :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **BONE_UPDATE_FULL** = ``0``
  97. The skeletons bones are fully updated (both position and rotation) to match the tracked bones.
  98. .. _class_OpenXRHand_constant_BONE_UPDATE_ROTATION_ONLY:
  99. .. rst-class:: classref-enumeration-constant
  100. :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **BONE_UPDATE_ROTATION_ONLY** = ``1``
  101. The skeletons bones are only rotated to align with the tracked bones, preserving bone length.
  102. .. _class_OpenXRHand_constant_BONE_UPDATE_MAX:
  103. .. rst-class:: classref-enumeration-constant
  104. :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **BONE_UPDATE_MAX** = ``2``
  105. Maximum supported bone update mode.
  106. .. rst-class:: classref-section-separator
  107. ----
  108. .. rst-class:: classref-descriptions-group
  109. Property Descriptions
  110. ---------------------
  111. .. _class_OpenXRHand_property_bone_update:
  112. .. rst-class:: classref-property
  113. :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **bone_update** = ``0`` :ref:`🔗<class_OpenXRHand_property_bone_update>`
  114. .. rst-class:: classref-property-setget
  115. - |void| **set_bone_update**\ (\ value\: :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>`\ )
  116. - :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **get_bone_update**\ (\ )
  117. Specify the type of updates to perform on the bone.
  118. .. rst-class:: classref-item-separator
  119. ----
  120. .. _class_OpenXRHand_property_hand:
  121. .. rst-class:: classref-property
  122. :ref:`Hands<enum_OpenXRHand_Hands>` **hand** = ``0`` :ref:`🔗<class_OpenXRHand_property_hand>`
  123. .. rst-class:: classref-property-setget
  124. - |void| **set_hand**\ (\ value\: :ref:`Hands<enum_OpenXRHand_Hands>`\ )
  125. - :ref:`Hands<enum_OpenXRHand_Hands>` **get_hand**\ (\ )
  126. Specifies whether this node tracks the left or right hand of the player.
  127. .. rst-class:: classref-item-separator
  128. ----
  129. .. _class_OpenXRHand_property_hand_skeleton:
  130. .. rst-class:: classref-property
  131. :ref:`NodePath<class_NodePath>` **hand_skeleton** = ``NodePath("")`` :ref:`🔗<class_OpenXRHand_property_hand_skeleton>`
  132. .. rst-class:: classref-property-setget
  133. - |void| **set_hand_skeleton**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
  134. - :ref:`NodePath<class_NodePath>` **get_hand_skeleton**\ (\ )
  135. Set a :ref:`Skeleton3D<class_Skeleton3D>` node for which the pose positions will be updated.
  136. .. rst-class:: classref-item-separator
  137. ----
  138. .. _class_OpenXRHand_property_motion_range:
  139. .. rst-class:: classref-property
  140. :ref:`MotionRange<enum_OpenXRHand_MotionRange>` **motion_range** = ``0`` :ref:`🔗<class_OpenXRHand_property_motion_range>`
  141. .. rst-class:: classref-property-setget
  142. - |void| **set_motion_range**\ (\ value\: :ref:`MotionRange<enum_OpenXRHand_MotionRange>`\ )
  143. - :ref:`MotionRange<enum_OpenXRHand_MotionRange>` **get_motion_range**\ (\ )
  144. Set the motion range (if supported) limiting the hand motion.
  145. .. rst-class:: classref-item-separator
  146. ----
  147. .. _class_OpenXRHand_property_skeleton_rig:
  148. .. rst-class:: classref-property
  149. :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **skeleton_rig** = ``0`` :ref:`🔗<class_OpenXRHand_property_skeleton_rig>`
  150. .. rst-class:: classref-property-setget
  151. - |void| **set_skeleton_rig**\ (\ value\: :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>`\ )
  152. - :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **get_skeleton_rig**\ (\ )
  153. Set the type of skeleton rig the :ref:`hand_skeleton<class_OpenXRHand_property_hand_skeleton>` is compliant with.
  154. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  155. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  156. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  157. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  158. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  159. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  160. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  161. .. |void| replace:: :abbr:`void (No return value.)`