class_arvrpositionaltracker.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/ARVRPositionalTracker.xml.
  6. .. _class_ARVRPositionalTracker:
  7. ARVRPositionalTracker
  8. =====================
  9. **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. A tracked object.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. An instance of this object represents a device that is tracked, such as a controller or anchor point. HMDs aren't represented here as they are handled internally.
  15. As controllers are turned on and the AR/VR interface detects them, instances of this object are automatically added to this list of active tracking objects accessible through the :ref:`ARVRServer<class_ARVRServer>`.
  16. The :ref:`ARVRController<class_ARVRController>` and :ref:`ARVRAnchor<class_ARVRAnchor>` both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDNative-based interfaces can interact with them.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`../tutorials/vr/index`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +---------------------------+------------------------------------------------------------+---------+
  27. | :ref:`float<class_float>` | :ref:`rumble<class_ARVRPositionalTracker_property_rumble>` | ``0.0`` |
  28. +---------------------------+------------------------------------------------------------+---------+
  29. .. rst-class:: classref-reftable-group
  30. Methods
  31. -------
  32. .. table::
  33. :widths: auto
  34. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`TrackerHand<enum_ARVRPositionalTracker_TrackerHand>` | :ref:`get_hand<class_ARVRPositionalTracker_method_get_hand>` **(** **)** |const| |
  36. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`int<class_int>` | :ref:`get_joy_id<class_ARVRPositionalTracker_method_get_joy_id>` **(** **)** |const| |
  38. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`Mesh<class_Mesh>` | :ref:`get_mesh<class_ARVRPositionalTracker_method_get_mesh>` **(** **)** |const| |
  40. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`String<class_String>` | :ref:`get_name<class_ARVRPositionalTracker_method_get_name>` **(** **)** |const| |
  42. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`Basis<class_Basis>` | :ref:`get_orientation<class_ARVRPositionalTracker_method_get_orientation>` **(** **)** |const| |
  44. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`Vector3<class_Vector3>` | :ref:`get_position<class_ARVRPositionalTracker_method_get_position>` **(** **)** |const| |
  46. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`get_tracker_id<class_ARVRPositionalTracker_method_get_tracker_id>` **(** **)** |const| |
  48. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`get_tracks_orientation<class_ARVRPositionalTracker_method_get_tracks_orientation>` **(** **)** |const| |
  50. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`bool<class_bool>` | :ref:`get_tracks_position<class_ARVRPositionalTracker_method_get_tracks_position>` **(** **)** |const| |
  52. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`Transform<class_Transform>` | :ref:`get_transform<class_ARVRPositionalTracker_method_get_transform>` **(** :ref:`bool<class_bool>` adjust_by_reference_frame **)** |const| |
  54. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`TrackerType<enum_ARVRServer_TrackerType>` | :ref:`get_type<class_ARVRPositionalTracker_method_get_type>` **(** **)** |const| |
  56. +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  57. .. rst-class:: classref-section-separator
  58. ----
  59. .. rst-class:: classref-descriptions-group
  60. Enumerations
  61. ------------
  62. .. _enum_ARVRPositionalTracker_TrackerHand:
  63. .. rst-class:: classref-enumeration
  64. enum **TrackerHand**:
  65. .. _class_ARVRPositionalTracker_constant_TRACKER_HAND_UNKNOWN:
  66. .. rst-class:: classref-enumeration-constant
  67. :ref:`TrackerHand<enum_ARVRPositionalTracker_TrackerHand>` **TRACKER_HAND_UNKNOWN** = ``0``
  68. The hand this tracker is held in is unknown or not applicable.
  69. .. _class_ARVRPositionalTracker_constant_TRACKER_LEFT_HAND:
  70. .. rst-class:: classref-enumeration-constant
  71. :ref:`TrackerHand<enum_ARVRPositionalTracker_TrackerHand>` **TRACKER_LEFT_HAND** = ``1``
  72. This tracker is the left hand controller.
  73. .. _class_ARVRPositionalTracker_constant_TRACKER_RIGHT_HAND:
  74. .. rst-class:: classref-enumeration-constant
  75. :ref:`TrackerHand<enum_ARVRPositionalTracker_TrackerHand>` **TRACKER_RIGHT_HAND** = ``2``
  76. This tracker is the right hand controller.
  77. .. rst-class:: classref-section-separator
  78. ----
  79. .. rst-class:: classref-descriptions-group
  80. Property Descriptions
  81. ---------------------
  82. .. _class_ARVRPositionalTracker_property_rumble:
  83. .. rst-class:: classref-property
  84. :ref:`float<class_float>` **rumble** = ``0.0``
  85. .. rst-class:: classref-property-setget
  86. - void **set_rumble** **(** :ref:`float<class_float>` value **)**
  87. - :ref:`float<class_float>` **get_rumble** **(** **)**
  88. The degree to which the tracker rumbles. Ranges from ``0.0`` to ``1.0`` with precision ``.01``.
  89. .. rst-class:: classref-section-separator
  90. ----
  91. .. rst-class:: classref-descriptions-group
  92. Method Descriptions
  93. -------------------
  94. .. _class_ARVRPositionalTracker_method_get_hand:
  95. .. rst-class:: classref-method
  96. :ref:`TrackerHand<enum_ARVRPositionalTracker_TrackerHand>` **get_hand** **(** **)** |const|
  97. Returns the hand holding this tracker, if known. See :ref:`TrackerHand<enum_ARVRPositionalTracker_TrackerHand>` constants.
  98. .. rst-class:: classref-item-separator
  99. ----
  100. .. _class_ARVRPositionalTracker_method_get_joy_id:
  101. .. rst-class:: classref-method
  102. :ref:`int<class_int>` **get_joy_id** **(** **)** |const|
  103. If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID.
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _class_ARVRPositionalTracker_method_get_mesh:
  107. .. rst-class:: classref-method
  108. :ref:`Mesh<class_Mesh>` **get_mesh** **(** **)** |const|
  109. Returns the mesh related to a controller or anchor point if one is available.
  110. .. rst-class:: classref-item-separator
  111. ----
  112. .. _class_ARVRPositionalTracker_method_get_name:
  113. .. rst-class:: classref-method
  114. :ref:`String<class_String>` **get_name** **(** **)** |const|
  115. Returns the controller or anchor point's name if available.
  116. .. rst-class:: classref-item-separator
  117. ----
  118. .. _class_ARVRPositionalTracker_method_get_orientation:
  119. .. rst-class:: classref-method
  120. :ref:`Basis<class_Basis>` **get_orientation** **(** **)** |const|
  121. Returns the controller's orientation matrix.
  122. .. rst-class:: classref-item-separator
  123. ----
  124. .. _class_ARVRPositionalTracker_method_get_position:
  125. .. rst-class:: classref-method
  126. :ref:`Vector3<class_Vector3>` **get_position** **(** **)** |const|
  127. Returns the world-space controller position.
  128. .. rst-class:: classref-item-separator
  129. ----
  130. .. _class_ARVRPositionalTracker_method_get_tracker_id:
  131. .. rst-class:: classref-method
  132. :ref:`int<class_int>` **get_tracker_id** **(** **)** |const|
  133. Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the :ref:`ARVRController<class_ARVRController>` and :ref:`ARVRAnchor<class_ARVRAnchor>` nodes.
  134. .. rst-class:: classref-item-separator
  135. ----
  136. .. _class_ARVRPositionalTracker_method_get_tracks_orientation:
  137. .. rst-class:: classref-method
  138. :ref:`bool<class_bool>` **get_tracks_orientation** **(** **)** |const|
  139. Returns ``true`` if this device tracks orientation.
  140. .. rst-class:: classref-item-separator
  141. ----
  142. .. _class_ARVRPositionalTracker_method_get_tracks_position:
  143. .. rst-class:: classref-method
  144. :ref:`bool<class_bool>` **get_tracks_position** **(** **)** |const|
  145. Returns ``true`` if this device tracks position.
  146. .. rst-class:: classref-item-separator
  147. ----
  148. .. _class_ARVRPositionalTracker_method_get_transform:
  149. .. rst-class:: classref-method
  150. :ref:`Transform<class_Transform>` **get_transform** **(** :ref:`bool<class_bool>` adjust_by_reference_frame **)** |const|
  151. Returns the transform combining this device's orientation and position.
  152. .. rst-class:: classref-item-separator
  153. ----
  154. .. _class_ARVRPositionalTracker_method_get_type:
  155. .. rst-class:: classref-method
  156. :ref:`TrackerType<enum_ARVRServer_TrackerType>` **get_type** **(** **)** |const|
  157. Returns the tracker's type.
  158. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  159. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  160. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  161. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`