:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/ARVRPositionalTracker.xml. .. _class_ARVRPositionalTracker: ARVRPositionalTracker ===================== **Inherits:** :ref:`Reference` **<** :ref:`Object` A tracked object. Description ----------- 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. 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`. The :ref:`ARVRController` and :ref:`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. Tutorials --------- - :doc:`../tutorials/vr/index` Properties ---------- +---------------------------+------------------------------------------------------------+---------+ | :ref:`float` | :ref:`rumble` | ``0.0`` | +---------------------------+------------------------------------------------------------+---------+ Methods ------- +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TrackerHand` | :ref:`get_hand` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_joy_id` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Mesh` | :ref:`get_mesh` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_name` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`get_orientation` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_position` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tracker_id` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_tracks_orientation` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_tracks_position` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`get_transform` **(** :ref:`bool` adjust_by_reference_frame **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TrackerType` | :ref:`get_type` **(** **)** |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ .. _enum_ARVRPositionalTracker_TrackerHand: .. _class_ARVRPositionalTracker_constant_TRACKER_HAND_UNKNOWN: .. _class_ARVRPositionalTracker_constant_TRACKER_LEFT_HAND: .. _class_ARVRPositionalTracker_constant_TRACKER_RIGHT_HAND: enum **TrackerHand**: - **TRACKER_HAND_UNKNOWN** = **0** --- The hand this tracker is held in is unknown or not applicable. - **TRACKER_LEFT_HAND** = **1** --- This tracker is the left hand controller. - **TRACKER_RIGHT_HAND** = **2** --- This tracker is the right hand controller. Property Descriptions --------------------- .. _class_ARVRPositionalTracker_property_rumble: - :ref:`float` **rumble** +-----------+-------------------+ | *Default* | ``0.0`` | +-----------+-------------------+ | *Setter* | set_rumble(value) | +-----------+-------------------+ | *Getter* | get_rumble() | +-----------+-------------------+ The degree to which the tracker rumbles. Ranges from ``0.0`` to ``1.0`` with precision ``.01``. Method Descriptions ------------------- .. _class_ARVRPositionalTracker_method_get_hand: - :ref:`TrackerHand` **get_hand** **(** **)** |const| Returns the hand holding this tracker, if known. See :ref:`TrackerHand` constants. ---- .. _class_ARVRPositionalTracker_method_get_joy_id: - :ref:`int` **get_joy_id** **(** **)** |const| If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID. ---- .. _class_ARVRPositionalTracker_method_get_mesh: - :ref:`Mesh` **get_mesh** **(** **)** |const| Returns the mesh related to a controller or anchor point if one is available. ---- .. _class_ARVRPositionalTracker_method_get_name: - :ref:`String` **get_name** **(** **)** |const| Returns the controller or anchor point's name if available. ---- .. _class_ARVRPositionalTracker_method_get_orientation: - :ref:`Basis` **get_orientation** **(** **)** |const| Returns the controller's orientation matrix. ---- .. _class_ARVRPositionalTracker_method_get_position: - :ref:`Vector3` **get_position** **(** **)** |const| Returns the world-space controller position. ---- .. _class_ARVRPositionalTracker_method_get_tracker_id: - :ref:`int` **get_tracker_id** **(** **)** |const| 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 :ref:`ARVRController` and :ref:`ARVRAnchor` nodes. ---- .. _class_ARVRPositionalTracker_method_get_tracks_orientation: - :ref:`bool` **get_tracks_orientation** **(** **)** |const| Returns ``true`` if this device tracks orientation. ---- .. _class_ARVRPositionalTracker_method_get_tracks_position: - :ref:`bool` **get_tracks_position** **(** **)** |const| Returns ``true`` if this device tracks position. ---- .. _class_ARVRPositionalTracker_method_get_transform: - :ref:`Transform` **get_transform** **(** :ref:`bool` adjust_by_reference_frame **)** |const| Returns the transform combining this device's orientation and position. ---- .. _class_ARVRPositionalTracker_method_get_type: - :ref:`TrackerType` **get_type** **(** **)** |const| Returns the tracker's type. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`