2
0

ARVRPositionalTracker.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ARVRPositionalTracker" inherits="Reference" version="3.4">
  3. <brief_description>
  4. A tracked object.
  5. </brief_description>
  6. <description>
  7. 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.
  8. 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 [ARVRServer].
  9. The [ARVRController] and [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.
  10. </description>
  11. <tutorials>
  12. <link>https://docs.godotengine.org/en/3.3/tutorials/vr/index.html</link>
  13. </tutorials>
  14. <methods>
  15. <method name="get_hand" qualifiers="const">
  16. <return type="int" enum="ARVRPositionalTracker.TrackerHand">
  17. </return>
  18. <description>
  19. Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
  20. </description>
  21. </method>
  22. <method name="get_joy_id" qualifiers="const">
  23. <return type="int">
  24. </return>
  25. <description>
  26. If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID.
  27. </description>
  28. </method>
  29. <method name="get_mesh" qualifiers="const">
  30. <return type="Mesh">
  31. </return>
  32. <description>
  33. Returns the mesh related to a controller or anchor point if one is available.
  34. </description>
  35. </method>
  36. <method name="get_name" qualifiers="const">
  37. <return type="String">
  38. </return>
  39. <description>
  40. Returns the controller or anchor point's name if available.
  41. </description>
  42. </method>
  43. <method name="get_orientation" qualifiers="const">
  44. <return type="Basis">
  45. </return>
  46. <description>
  47. Returns the controller's orientation matrix.
  48. </description>
  49. </method>
  50. <method name="get_position" qualifiers="const">
  51. <return type="Vector3">
  52. </return>
  53. <description>
  54. Returns the world-space controller position.
  55. </description>
  56. </method>
  57. <method name="get_tracker_id" qualifiers="const">
  58. <return type="int">
  59. </return>
  60. <description>
  61. 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 [ARVRController] and [ARVRAnchor] nodes.
  62. </description>
  63. </method>
  64. <method name="get_tracks_orientation" qualifiers="const">
  65. <return type="bool">
  66. </return>
  67. <description>
  68. Returns [code]true[/code] if this device tracks orientation.
  69. </description>
  70. </method>
  71. <method name="get_tracks_position" qualifiers="const">
  72. <return type="bool">
  73. </return>
  74. <description>
  75. Returns [code]true[/code] if this device tracks position.
  76. </description>
  77. </method>
  78. <method name="get_transform" qualifiers="const">
  79. <return type="Transform">
  80. </return>
  81. <argument index="0" name="adjust_by_reference_frame" type="bool">
  82. </argument>
  83. <description>
  84. Returns the transform combining this device's orientation and position.
  85. </description>
  86. </method>
  87. <method name="get_type" qualifiers="const">
  88. <return type="int" enum="ARVRServer.TrackerType">
  89. </return>
  90. <description>
  91. Returns the tracker's type.
  92. </description>
  93. </method>
  94. </methods>
  95. <members>
  96. <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
  97. The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code].
  98. </member>
  99. </members>
  100. <constants>
  101. <constant name="TRACKER_HAND_UNKNOWN" value="0" enum="TrackerHand">
  102. The hand this tracker is held in is unknown or not applicable.
  103. </constant>
  104. <constant name="TRACKER_LEFT_HAND" value="1" enum="TrackerHand">
  105. This tracker is the left hand controller.
  106. </constant>
  107. <constant name="TRACKER_RIGHT_HAND" value="2" enum="TrackerHand">
  108. This tracker is the right hand controller.
  109. </constant>
  110. </constants>
  111. </class>