mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 17:28:58 +00:00
classref: Sync with current master branch (f87858a8f)
This commit is contained in:
+72
-34
@@ -16,100 +16,138 @@ XRNode3D
|
||||
|
||||
A spatial node that has its position automatically updated by the :ref:`XRServer<class_XRServer>`.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
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.
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
+-------------------------------------+-------------------------------------------------+----------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`pose<class_XRNode3D_property_pose>` | ``&"default"`` |
|
||||
+-------------------------------------+-------------------------------------------------+----------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`tracker<class_XRNode3D_property_tracker>` | ``&""`` |
|
||||
+-------------------------------------+-------------------------------------------------+----------------+
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------+-------------------------------------------------+----------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`pose<class_XRNode3D_property_pose>` | ``&"default"`` |
|
||||
+-------------------------------------+-------------------------------------------------+----------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`tracker<class_XRNode3D_property_tracker>` | ``&""`` |
|
||||
+-------------------------------------+-------------------------------------------------+----------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_has_tracking_data<class_XRNode3D_method_get_has_tracking_data>` **(** **)** |const| |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_is_active<class_XRNode3D_method_get_is_active>` **(** **)** |const| |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`XRPose<class_XRPose>` | :ref:`get_pose<class_XRNode3D_method_get_pose>` **(** **)** |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| 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 **)** |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_has_tracking_data<class_XRNode3D_method_get_has_tracking_data>` **(** **)** |const| |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_is_active<class_XRNode3D_method_get_is_active>` **(** **)** |const| |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`XRPose<class_XRPose>` | :ref:`get_pose<class_XRNode3D_method_get_pose>` **(** **)** |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| 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 **)** |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_XRNode3D_property_pose:
|
||||
|
||||
- :ref:`StringName<class_StringName>` **pose**
|
||||
.. rst-class:: classref-property
|
||||
|
||||
+-----------+----------------------+
|
||||
| *Default* | ``&"default"`` |
|
||||
+-----------+----------------------+
|
||||
| *Setter* | set_pose_name(value) |
|
||||
+-----------+----------------------+
|
||||
| *Getter* | get_pose_name() |
|
||||
+-----------+----------------------+
|
||||
:ref:`StringName<class_StringName>` **pose** = ``&"default"``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_pose_name** **(** :ref:`StringName<class_StringName>` value **)**
|
||||
- :ref:`StringName<class_StringName>` **get_pose_name** **(** **)**
|
||||
|
||||
The name of the pose we're bound to. Which poses a tracker supports is not known during design time.
|
||||
|
||||
Godot defines number of standard pose names such as ``aim`` and ``grip`` but other may be configured within a given :ref:`XRInterface<class_XRInterface>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_XRNode3D_property_tracker:
|
||||
|
||||
- :ref:`StringName<class_StringName>` **tracker**
|
||||
.. rst-class:: classref-property
|
||||
|
||||
+-----------+--------------------+
|
||||
| *Default* | ``&""`` |
|
||||
+-----------+--------------------+
|
||||
| *Setter* | set_tracker(value) |
|
||||
+-----------+--------------------+
|
||||
| *Getter* | get_tracker() |
|
||||
+-----------+--------------------+
|
||||
:ref:`StringName<class_StringName>` **tracker** = ``&""``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_tracker** **(** :ref:`StringName<class_StringName>` value **)**
|
||||
- :ref:`StringName<class_StringName>` **get_tracker** **(** **)**
|
||||
|
||||
The name of the tracker we're bound to. Which trackers are available is not known during design time.
|
||||
|
||||
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>`.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_XRNode3D_method_get_has_tracking_data:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_has_tracking_data** **(** **)** |const|
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **get_has_tracking_data** **(** **)** |const|
|
||||
|
||||
Returns ``true`` if the :ref:`tracker<class_XRNode3D_property_tracker>` has current tracking data for the :ref:`pose<class_XRNode3D_property_pose>` being tracked.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_XRNode3D_method_get_is_active:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_is_active** **(** **)** |const|
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **get_is_active** **(** **)** |const|
|
||||
|
||||
Returns ``true`` if the :ref:`tracker<class_XRNode3D_property_tracker>` has been registered and the :ref:`pose<class_XRNode3D_property_pose>` is being tracked.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_XRNode3D_method_get_pose:
|
||||
|
||||
- :ref:`XRPose<class_XRPose>` **get_pose** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`XRPose<class_XRPose>` **get_pose** **(** **)**
|
||||
|
||||
Returns the :ref:`XRPose<class_XRPose>` containing the current state of the pose being tracked. This gives access to additional properties of this pose.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_XRNode3D_method_trigger_haptic_pulse:
|
||||
|
||||
- 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 **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
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 **)**
|
||||
|
||||
Triggers a haptic pulse on a device associated with this interface.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user