mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
42 lines
2.5 KiB
XML
42 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="XRPose" inherits="RefCounted" version="4.0">
|
|
<brief_description>
|
|
This object contains all data related to a pose on a tracked object.
|
|
</brief_description>
|
|
<description>
|
|
XR runtimes often identify multiple locations on devices such as controllers that are spatially tracked.
|
|
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.
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="get_adjusted_transform" qualifiers="const">
|
|
<return type="Transform3D" />
|
|
<description>
|
|
Returns the [member transform] with world scale and our reference frame applied. This is the transform used to position [XRNode3D] objects.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)">
|
|
The angular velocity for this pose.
|
|
</member>
|
|
<member name="has_tracking_data" type="bool" setter="set_has_tracking_data" getter="get_has_tracking_data" default="false">
|
|
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.
|
|
</member>
|
|
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
|
|
The linear velocity of this pose.
|
|
</member>
|
|
<member name="name" type="StringName" setter="set_name" getter="get_name" default="&""">
|
|
The name of this pose. Pose names are often driven by an action map setup by the user. Godot does suggest a number of pose names that it expects [XRInterface]s to implement:
|
|
- [code]root[/code] defines a root location, often used for tracked objects that do not have further nodes.
|
|
- [code]aim[/code] defines the tip of a controller with the orientation pointing outwards, for instance: add your raycasts to this.
|
|
- [code]grip[/code] defines the location where the user grips the controller
|
|
- [code]skeleton[/code] defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime.
|
|
</member>
|
|
<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)">
|
|
The transform containing the original and transform as reported by the XR runtime.
|
|
</member>
|
|
</members>
|
|
</class>
|