class_xrnode3d.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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/doc/classes/XRNode3D.xml.
  6. .. _class_XRNode3D:
  7. XRNode3D
  8. ========
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`XRAnchor3D<class_XRAnchor3D>`, :ref:`XRController3D<class_XRController3D>`
  11. A 3D node that has its position automatically updated by the :ref:`XRServer<class_XRServer>`.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. This node can be bound to a specific pose of a :ref:`XRPositionalTracker<class_XRPositionalTracker>` and will automatically have its :ref:`Node3D.transform<class_Node3D_property_transform>` updated by the :ref:`XRServer<class_XRServer>`. Nodes of this type must be added as children of the :ref:`XROrigin3D<class_XROrigin3D>` node.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`XR documentation index <../tutorials/xr/index>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-------------------------------------+---------------------------------------------------------------------+----------------+
  26. | :ref:`StringName<class_StringName>` | :ref:`pose<class_XRNode3D_property_pose>` | ``&"default"`` |
  27. +-------------------------------------+---------------------------------------------------------------------+----------------+
  28. | :ref:`bool<class_bool>` | :ref:`show_when_tracked<class_XRNode3D_property_show_when_tracked>` | ``false`` |
  29. +-------------------------------------+---------------------------------------------------------------------+----------------+
  30. | :ref:`StringName<class_StringName>` | :ref:`tracker<class_XRNode3D_property_tracker>` | ``&""`` |
  31. +-------------------------------------+---------------------------------------------------------------------+----------------+
  32. .. rst-class:: classref-reftable-group
  33. Methods
  34. -------
  35. .. table::
  36. :widths: auto
  37. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`get_has_tracking_data<class_XRNode3D_method_get_has_tracking_data>`\ (\ ) |const| |
  39. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`bool<class_bool>` | :ref:`get_is_active<class_XRNode3D_method_get_is_active>`\ (\ ) |const| |
  41. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`XRPose<class_XRPose>` | :ref:`get_pose<class_XRNode3D_method_get_pose>`\ (\ ) |
  43. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`trigger_haptic_pulse<class_XRNode3D_method_trigger_haptic_pulse>`\ (\ action_name\: :ref:`String<class_String>`, frequency\: :ref:`float<class_float>`, amplitude\: :ref:`float<class_float>`, duration_sec\: :ref:`float<class_float>`, delay_sec\: :ref:`float<class_float>`\ ) |
  45. +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. .. rst-class:: classref-section-separator
  47. ----
  48. .. rst-class:: classref-descriptions-group
  49. Signals
  50. -------
  51. .. _class_XRNode3D_signal_tracking_changed:
  52. .. rst-class:: classref-signal
  53. **tracking_changed**\ (\ tracking\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_XRNode3D_signal_tracking_changed>`
  54. Emitted when the :ref:`tracker<class_XRNode3D_property_tracker>` starts or stops receiving updated tracking data for the :ref:`pose<class_XRNode3D_property_pose>` being tracked. The ``tracking`` argument indicates whether the tracker is getting updated tracking data.
  55. .. rst-class:: classref-section-separator
  56. ----
  57. .. rst-class:: classref-descriptions-group
  58. Property Descriptions
  59. ---------------------
  60. .. _class_XRNode3D_property_pose:
  61. .. rst-class:: classref-property
  62. :ref:`StringName<class_StringName>` **pose** = ``&"default"`` :ref:`🔗<class_XRNode3D_property_pose>`
  63. .. rst-class:: classref-property-setget
  64. - |void| **set_pose_name**\ (\ value\: :ref:`StringName<class_StringName>`\ )
  65. - :ref:`StringName<class_StringName>` **get_pose_name**\ (\ )
  66. The name of the pose we're bound to. Which poses a tracker supports is not known during design time.
  67. Godot defines number of standard pose names such as ``aim`` and ``grip`` but other may be configured within a given :ref:`XRInterface<class_XRInterface>`.
  68. .. rst-class:: classref-item-separator
  69. ----
  70. .. _class_XRNode3D_property_show_when_tracked:
  71. .. rst-class:: classref-property
  72. :ref:`bool<class_bool>` **show_when_tracked** = ``false`` :ref:`🔗<class_XRNode3D_property_show_when_tracked>`
  73. .. rst-class:: classref-property-setget
  74. - |void| **set_show_when_tracked**\ (\ value\: :ref:`bool<class_bool>`\ )
  75. - :ref:`bool<class_bool>` **get_show_when_tracked**\ (\ )
  76. Enables showing the node when tracking starts, and hiding the node when tracking is lost.
  77. .. rst-class:: classref-item-separator
  78. ----
  79. .. _class_XRNode3D_property_tracker:
  80. .. rst-class:: classref-property
  81. :ref:`StringName<class_StringName>` **tracker** = ``&""`` :ref:`🔗<class_XRNode3D_property_tracker>`
  82. .. rst-class:: classref-property-setget
  83. - |void| **set_tracker**\ (\ value\: :ref:`StringName<class_StringName>`\ )
  84. - :ref:`StringName<class_StringName>` **get_tracker**\ (\ )
  85. The name of the tracker we're bound to. Which trackers are available is not known during design time.
  86. Godot defines a number of standard trackers such as ``left_hand`` and ``right_hand`` but others may be configured within a given :ref:`XRInterface<class_XRInterface>`.
  87. .. rst-class:: classref-section-separator
  88. ----
  89. .. rst-class:: classref-descriptions-group
  90. Method Descriptions
  91. -------------------
  92. .. _class_XRNode3D_method_get_has_tracking_data:
  93. .. rst-class:: classref-method
  94. :ref:`bool<class_bool>` **get_has_tracking_data**\ (\ ) |const| :ref:`🔗<class_XRNode3D_method_get_has_tracking_data>`
  95. Returns ``true`` if the :ref:`tracker<class_XRNode3D_property_tracker>` has current tracking data for the :ref:`pose<class_XRNode3D_property_pose>` being tracked.
  96. .. rst-class:: classref-item-separator
  97. ----
  98. .. _class_XRNode3D_method_get_is_active:
  99. .. rst-class:: classref-method
  100. :ref:`bool<class_bool>` **get_is_active**\ (\ ) |const| :ref:`🔗<class_XRNode3D_method_get_is_active>`
  101. Returns ``true`` if the :ref:`tracker<class_XRNode3D_property_tracker>` has been registered and the :ref:`pose<class_XRNode3D_property_pose>` is being tracked.
  102. .. rst-class:: classref-item-separator
  103. ----
  104. .. _class_XRNode3D_method_get_pose:
  105. .. rst-class:: classref-method
  106. :ref:`XRPose<class_XRPose>` **get_pose**\ (\ ) :ref:`🔗<class_XRNode3D_method_get_pose>`
  107. Returns the :ref:`XRPose<class_XRPose>` containing the current state of the pose being tracked. This gives access to additional properties of this pose.
  108. .. rst-class:: classref-item-separator
  109. ----
  110. .. _class_XRNode3D_method_trigger_haptic_pulse:
  111. .. rst-class:: classref-method
  112. |void| **trigger_haptic_pulse**\ (\ action_name\: :ref:`String<class_String>`, frequency\: :ref:`float<class_float>`, amplitude\: :ref:`float<class_float>`, duration_sec\: :ref:`float<class_float>`, delay_sec\: :ref:`float<class_float>`\ ) :ref:`🔗<class_XRNode3D_method_trigger_haptic_pulse>`
  113. Triggers a haptic pulse on a device associated with this interface.
  114. \ ``action_name`` is the name of the action for this pulse.
  115. \ ``frequency`` is the frequency of the pulse, set to ``0.0`` to have the system use a default frequency.
  116. \ ``amplitude`` is the amplitude of the pulse between ``0.0`` and ``1.0``.
  117. \ ``duration_sec`` is the duration of the pulse in seconds.
  118. \ ``delay_sec`` is a delay in seconds before the pulse is given.
  119. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  120. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  121. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  122. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  123. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  124. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  125. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  126. .. |void| replace:: :abbr:`void (No return value.)`