2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2021-03-23 12:40:34 +00:00
<class name= "ARVRPositionalTracker" inherits= "Object" version= "3.3" >
2017-09-12 20:42:36 +00:00
<brief_description >
2019-06-21 23:04:47 +00:00
A tracked object.
2017-09-12 20:42:36 +00:00
</brief_description>
<description >
2019-06-21 23:04:47 +00:00
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 [ARVRServer].
The [ARVRController] and [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.
2017-09-12 20:42:36 +00:00
</description>
<tutorials >
2021-03-26 09:43:43 +00:00
<link > https://docs.godotengine.org/en/3.3/tutorials/vr/index.html</link>
2017-09-12 20:42:36 +00:00
</tutorials>
<methods >
<method name= "get_hand" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" enum= "ARVRPositionalTracker.TrackerHand" />
2017-09-12 20:42:36 +00:00
<description >
2019-12-06 22:09:20 +00:00
Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_joy_id" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2019-06-21 23:04:47 +00:00
If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID.
2017-09-12 20:42:36 +00:00
</description>
</method>
2019-02-05 10:02:13 +00:00
<method name= "get_mesh" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Mesh" />
2019-02-05 10:02:13 +00:00
<description >
Returns the mesh related to a controller or anchor point if one is available.
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "get_name" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-07 06:16:27 +00:00
Returns the controller or anchor point's name if available.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_orientation" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Basis" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-07 06:16:27 +00:00
Returns the controller's orientation matrix.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_position" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Vector3" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-07 06:16:27 +00:00
Returns the world-space controller position.
2017-09-12 20:42:36 +00:00
</description>
</method>
2020-02-27 11:09:23 +00:00
<method name= "get_tracker_id" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2020-02-27 11:09:23 +00:00
<description >
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 [ARVRAnchor] nodes.
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "get_tracks_orientation" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-07 06:16:27 +00:00
Returns [code]true[/code] if this device tracks orientation.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_tracks_position" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-07 06:16:27 +00:00
Returns [code]true[/code] if this device tracks position.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_transform" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Transform" />
<argument index= "0" name= "adjust_by_reference_frame" type= "bool" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-07 06:16:27 +00:00
Returns the transform combining this device's orientation and position.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_type" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" enum= "ARVRServer.TrackerType" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-07 06:16:27 +00:00
Returns the tracker's type.
2017-09-12 20:42:36 +00:00
</description>
</method>
</methods>
2017-11-13 08:24:36 +00:00
<members >
2019-06-29 10:38:01 +00:00
<member name= "rumble" type= "float" setter= "set_rumble" getter= "get_rumble" default= "0.0" >
2017-12-07 06:16:27 +00:00
The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code].
2017-11-13 08:24:36 +00:00
</member>
</members>
2017-09-12 20:42:36 +00:00
<constants >
2017-11-24 22:16:30 +00:00
<constant name= "TRACKER_HAND_UNKNOWN" value= "0" enum= "TrackerHand" >
2017-10-22 00:35:25 +00:00
The hand this tracker is held in is unknown or not applicable.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "TRACKER_LEFT_HAND" value= "1" enum= "TrackerHand" >
2017-10-22 00:35:25 +00:00
This tracker is the left hand controller.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "TRACKER_RIGHT_HAND" value= "2" enum= "TrackerHand" >
2017-10-22 00:35:25 +00:00
This tracker is the right hand controller.
2017-09-12 20:42:36 +00:00
</constant>
</constants>
</class>