class_xrnode3d.rst 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the XRNode3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_XRNode3D:
  6. XRNode3D
  7. ========
  8. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`XRAnchor3D<class_XRAnchor3D>`, :ref:`XRController3D<class_XRController3D>`
  10. A spatial node that has its position automatically updated by the :ref:`XRServer<class_XRServer>`.
  11. Description
  12. -----------
  13. 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.
  14. Properties
  15. ----------
  16. +-------------------------------------+-------------------------------------------------+----------------+
  17. | :ref:`StringName<class_StringName>` | :ref:`pose<class_XRNode3D_property_pose>` | ``&"default"`` |
  18. +-------------------------------------+-------------------------------------------------+----------------+
  19. | :ref:`StringName<class_StringName>` | :ref:`tracker<class_XRNode3D_property_tracker>` | ``&""`` |
  20. +-------------------------------------+-------------------------------------------------+----------------+
  21. Methods
  22. -------
  23. +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`get_has_tracking_data<class_XRNode3D_method_get_has_tracking_data>` **(** **)** |const| |
  25. +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`get_is_active<class_XRNode3D_method_get_is_active>` **(** **)** |const| |
  27. +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`XRPose<class_XRPose>` | :ref:`get_pose<class_XRNode3D_method_get_pose>` **(** **)** |
  29. +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`trigger_haptic_pulse<class_XRNode3D_method_trigger_haptic_pulse>` **(** :ref:`String<class_String>` action_name, :ref:`float<class_float>` frequency, :ref:`float<class_float>` amplitude, :ref:`float<class_float>` duration_sec, :ref:`float<class_float>` delay_sec **)** |
  31. +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. Property Descriptions
  33. ---------------------
  34. .. _class_XRNode3D_property_pose:
  35. - :ref:`StringName<class_StringName>` **pose**
  36. +-----------+----------------------+
  37. | *Default* | ``&"default"`` |
  38. +-----------+----------------------+
  39. | *Setter* | set_pose_name(value) |
  40. +-----------+----------------------+
  41. | *Getter* | get_pose_name() |
  42. +-----------+----------------------+
  43. The name of the pose we're bound to. Which poses a tracker supports is not known during design time.
  44. Godot defines number of standard pose names such as ``aim`` and ``grip`` but other may be configured within a given :ref:`XRInterface<class_XRInterface>`.
  45. ----
  46. .. _class_XRNode3D_property_tracker:
  47. - :ref:`StringName<class_StringName>` **tracker**
  48. +-----------+--------------------+
  49. | *Default* | ``&""`` |
  50. +-----------+--------------------+
  51. | *Setter* | set_tracker(value) |
  52. +-----------+--------------------+
  53. | *Getter* | get_tracker() |
  54. +-----------+--------------------+
  55. The name of the tracker we're bound to. Which trackers are available is not known during design time.
  56. 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>`.
  57. Method Descriptions
  58. -------------------
  59. .. _class_XRNode3D_method_get_has_tracking_data:
  60. - :ref:`bool<class_bool>` **get_has_tracking_data** **(** **)** |const|
  61. Returns ``true`` if the :ref:`tracker<class_XRNode3D_property_tracker>` has current tracking data for the :ref:`pose<class_XRNode3D_property_pose>` being tracked.
  62. ----
  63. .. _class_XRNode3D_method_get_is_active:
  64. - :ref:`bool<class_bool>` **get_is_active** **(** **)** |const|
  65. Returns ``true`` if the :ref:`tracker<class_XRNode3D_property_tracker>` has been registered and the :ref:`pose<class_XRNode3D_property_pose>` is being tracked.
  66. ----
  67. .. _class_XRNode3D_method_get_pose:
  68. - :ref:`XRPose<class_XRPose>` **get_pose** **(** **)**
  69. Returns the :ref:`XRPose<class_XRPose>` containing the current state of the pose being tracked. This gives access to additional properties of this pose.
  70. ----
  71. .. _class_XRNode3D_method_trigger_haptic_pulse:
  72. - void **trigger_haptic_pulse** **(** :ref:`String<class_String>` action_name, :ref:`float<class_float>` frequency, :ref:`float<class_float>` amplitude, :ref:`float<class_float>` duration_sec, :ref:`float<class_float>` delay_sec **)**
  73. Triggers a haptic pulse on a device associated with this interface.
  74. \ ``action_name`` is the name of the action for this pulse.
  75. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  76. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  77. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  78. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  79. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  80. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`