Skip to content
0.2.0-dev Download ZIP
56 lines ·3.5 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="XRPose" inherits="RefCounted" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 This object contains all data related to a pose on a tracked object.
5 </brief_description>
6 <description>
7 XR runtimes often identify multiple locations on devices such as controllers that are spatially tracked.
8 Orientation, location, linear velocity and angular velocity are all provided for each pose by the XR runtime. This object contains this state of a pose.
9 </description>
10 <tutorials>
11 <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
12 </tutorials>
13 <methods>
14 <method name="get_adjusted_transform" qualifiers="const">
15 <return type="Transform3D" />
16 <description>
17 Returns the [member transform] with world scale and our reference frame applied. This is the transform used to position [XRNode3D] objects.
18 </description>
19 </method>
20 </methods>
21 <members>
22 <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)">
23 The angular velocity for this pose.
24 </member>
25 <member name="has_tracking_data" type="bool" setter="set_has_tracking_data" getter="get_has_tracking_data" default="false">
26 If [code]true[/code] our tracking data is up to date. If [code]false[/code] we're no longer receiving new tracking data and our state is whatever that last valid state was.
27 </member>
28 <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
29 The linear velocity of this pose.
30 </member>
31 <member name="name" type="StringName" setter="set_name" getter="get_name" default="&amp;&quot;&quot;">
32 The name of this pose. Usually, this name is derived from an action map set up by the user. Godot also suggests some pose names that [XRInterface] objects are expected to implement:
33 - [code]root[/code] is the root location, often used for tracked objects that do not have further nodes.
34 - [code]aim[/code] is the tip of a controller with its orientation pointing outwards, often used for raycasts.
35 - [code]grip[/code] is the location where the user grips the controller.
36 - [code]skeleton[/code] is the root location for a hand mesh, when using hand tracking and an animated skeleton is supplied by the XR runtime.
37 </member>
38 <member name="tracking_confidence" type="int" setter="set_tracking_confidence" getter="get_tracking_confidence" enum="XRPose.TrackingConfidence" default="0">
39 The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.
40 </member>
41 <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
42 The transform containing the original and transform as reported by the XR runtime.
43 </member>
44 </members>
45 <constants>
46 <constant name="XR_TRACKING_CONFIDENCE_NONE" value="0" enum="TrackingConfidence">
47 No tracking information is available for this pose.
48 </constant>
49 <constant name="XR_TRACKING_CONFIDENCE_LOW" value="1" enum="TrackingConfidence">
50 Tracking information may be inaccurate or estimated. For example, with inside out tracking this would indicate a controller may be (partially) obscured.
51 </constant>
52 <constant name="XR_TRACKING_CONFIDENCE_HIGH" value="2" enum="TrackingConfidence">
53 Tracking information is considered accurate and up to date.
54 </constant>
55 </constants>
56</class>