ARVRPositionalTracker

    A tracked object.

    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 .

    The ARVRController and 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

    Methods

    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

    • get_hand ( ) const

    Returns the hand holding this tracker, if known. See TrackerHand constants.


    • 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.


    • Mesh get_mesh ( ) const

    Returns the mesh related to a controller or anchor point if one is available.


    Returns the controller or anchor point’s name if available.


    • get_orientation ( ) const

    Returns the controller’s orientation matrix.



    • 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 ARVRController and nodes.


    • bool get_tracks_orientation ( ) const

    Returns true if this device tracks orientation.


    • get_tracks_position ( ) const

    Returns if this device tracks position.


    • Transform get_transform ( adjust_by_reference_frame ) const

    Returns the transform combining this device’s orientation and position.


    Returns the tracker’s type.