class_arvrpositionaltracker.rst 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the ARVRPositionalTracker.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_ARVRPositionalTracker:
  6. ARVRPositionalTracker
  7. =====================
  8. **Inherits:** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. A tracked object.
  13. Properties
  14. ----------
  15. +---------------------------+------------------------------------------------------------+-----+
  16. | :ref:`float<class_float>` | :ref:`rumble<class_ARVRPositionalTracker_property_rumble>` | 0.0 |
  17. +---------------------------+------------------------------------------------------------+-----+
  18. Methods
  19. -------
  20. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`TrackerHand<enum_ARVRPositionalTracker_TrackerHand>` | :ref:`get_hand<class_ARVRPositionalTracker_method_get_hand>` **(** **)** const |
  22. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`get_joy_id<class_ARVRPositionalTracker_method_get_joy_id>` **(** **)** const |
  24. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`Mesh<class_Mesh>` | :ref:`get_mesh<class_ARVRPositionalTracker_method_get_mesh>` **(** **)** const |
  26. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`String<class_String>` | :ref:`get_name<class_ARVRPositionalTracker_method_get_name>` **(** **)** const |
  28. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`Basis<class_Basis>` | :ref:`get_orientation<class_ARVRPositionalTracker_method_get_orientation>` **(** **)** const |
  30. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`Vector3<class_Vector3>` | :ref:`get_position<class_ARVRPositionalTracker_method_get_position>` **(** **)** const |
  32. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`get_tracks_orientation<class_ARVRPositionalTracker_method_get_tracks_orientation>` **(** **)** const |
  34. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`get_tracks_position<class_ARVRPositionalTracker_method_get_tracks_position>` **(** **)** const |
  36. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`Transform<class_Transform>` | :ref:`get_transform<class_ARVRPositionalTracker_method_get_transform>` **(** :ref:`bool<class_bool>` adjust_by_reference_frame **)** const |
  38. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`TrackerType<enum_ARVRServer_TrackerType>` | :ref:`get_type<class_ARVRPositionalTracker_method_get_type>` **(** **)** const |
  40. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  41. Enumerations
  42. ------------
  43. .. _enum_ARVRPositionalTracker_TrackerHand:
  44. .. _class_ARVRPositionalTracker_constant_TRACKER_HAND_UNKNOWN:
  45. .. _class_ARVRPositionalTracker_constant_TRACKER_LEFT_HAND:
  46. .. _class_ARVRPositionalTracker_constant_TRACKER_RIGHT_HAND:
  47. enum **TrackerHand**:
  48. - **TRACKER_HAND_UNKNOWN** = **0** --- The hand this tracker is held in is unknown or not applicable.
  49. - **TRACKER_LEFT_HAND** = **1** --- This tracker is the left hand controller.
  50. - **TRACKER_RIGHT_HAND** = **2** --- This tracker is the right hand controller.
  51. Description
  52. -----------
  53. 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.
  54. 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>`.
  55. 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.
  56. Property Descriptions
  57. ---------------------
  58. .. _class_ARVRPositionalTracker_property_rumble:
  59. - :ref:`float<class_float>` **rumble**
  60. +-----------+-------------------+
  61. | *Default* | 0.0 |
  62. +-----------+-------------------+
  63. | *Setter* | set_rumble(value) |
  64. +-----------+-------------------+
  65. | *Getter* | get_rumble() |
  66. +-----------+-------------------+
  67. The degree to which the tracker rumbles. Ranges from ``0.0`` to ``1.0`` with precision ``.01``.
  68. Method Descriptions
  69. -------------------
  70. .. _class_ARVRPositionalTracker_method_get_hand:
  71. - :ref:`TrackerHand<enum_ARVRPositionalTracker_TrackerHand>` **get_hand** **(** **)** const
  72. Returns the hand holding this tracker, if known. See ``TRACKER_*`` constants.
  73. .. _class_ARVRPositionalTracker_method_get_joy_id:
  74. - :ref:`int<class_int>` **get_joy_id** **(** **)** const
  75. If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID.
  76. .. _class_ARVRPositionalTracker_method_get_mesh:
  77. - :ref:`Mesh<class_Mesh>` **get_mesh** **(** **)** const
  78. Returns the mesh related to a controller or anchor point if one is available.
  79. .. _class_ARVRPositionalTracker_method_get_name:
  80. - :ref:`String<class_String>` **get_name** **(** **)** const
  81. Returns the controller or anchor point's name if available.
  82. .. _class_ARVRPositionalTracker_method_get_orientation:
  83. - :ref:`Basis<class_Basis>` **get_orientation** **(** **)** const
  84. Returns the controller's orientation matrix.
  85. .. _class_ARVRPositionalTracker_method_get_position:
  86. - :ref:`Vector3<class_Vector3>` **get_position** **(** **)** const
  87. Returns the world-space controller position.
  88. .. _class_ARVRPositionalTracker_method_get_tracks_orientation:
  89. - :ref:`bool<class_bool>` **get_tracks_orientation** **(** **)** const
  90. Returns ``true`` if this device tracks orientation.
  91. .. _class_ARVRPositionalTracker_method_get_tracks_position:
  92. - :ref:`bool<class_bool>` **get_tracks_position** **(** **)** const
  93. Returns ``true`` if this device tracks position.
  94. .. _class_ARVRPositionalTracker_method_get_transform:
  95. - :ref:`Transform<class_Transform>` **get_transform** **(** :ref:`bool<class_bool>` adjust_by_reference_frame **)** const
  96. Returns the transform combining this device's orientation and position.
  97. .. _class_ARVRPositionalTracker_method_get_type:
  98. - :ref:`TrackerType<enum_ARVRServer_TrackerType>` **get_type** **(** **)** const
  99. Returns the tracker's type.