Rework XR Trackers to have a common ancestor. Allow creation of XRNode3D to drive node positions and visibility.
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="XRPositionalTracker" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<class name="XRPositionalTracker" inherits="XRTracker" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A tracked object.
|
||||
</brief_description>
|
||||
<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 [XRInterface] detects them, instances of this object are automatically added to this list of active tracking objects accessible through the [XRServer].
|
||||
The [XRController3D] and [XRAnchor3D] 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 GDExtension-based interfaces can interact with them.
|
||||
The [XRNode3D] and [XRAnchor3D] 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 GDExtension-based interfaces can interact with them.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_input" qualifiers="const">
|
||||
<method name="get_input" qualifiers="const" deprecated="Use through [XRControllerTracker].">
|
||||
<return type="Variant" />
|
||||
<param index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
@ -40,7 +40,7 @@
|
||||
Marks this pose as invalid, we don't clear the last reported state but it allows users to decide if trackers need to be hidden if we lose tracking or just remain at their last known position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_input">
|
||||
<method name="set_input" deprecated="Use through [XRControllerTracker].">
|
||||
<return type="void" />
|
||||
<param index="0" name="name" type="StringName" />
|
||||
<param index="1" name="value" type="Variant" />
|
||||
@ -61,23 +61,12 @@
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="description" type="String" setter="set_tracker_desc" getter="get_tracker_desc" default="""">
|
||||
The description of this tracker.
|
||||
</member>
|
||||
<member name="hand" type="int" setter="set_tracker_hand" getter="get_tracker_hand" enum="XRPositionalTracker.TrackerHand" default="0">
|
||||
Defines which hand this tracker relates to.
|
||||
</member>
|
||||
<member name="name" type="StringName" setter="set_tracker_name" getter="get_tracker_name" default="&"Unknown"">
|
||||
The unique name of this tracker. The trackers that are available differ between various XR runtimes and can often be configured by the user. Godot maintains a number of reserved names that it expects the [XRInterface] to implement if applicable:
|
||||
- [code]left_hand[/code] identifies the controller held in the players left hand
|
||||
- [code]right_hand[/code] identifies the controller held in the players right hand
|
||||
</member>
|
||||
<member name="profile" type="String" setter="set_tracker_profile" getter="get_tracker_profile" default="""">
|
||||
The profile associated with this tracker, interface dependent but will indicate the type of controller being tracked.
|
||||
</member>
|
||||
<member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" enum="XRServer.TrackerType" default="128">
|
||||
The type of tracker.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="button_pressed">
|
||||
@ -135,5 +124,8 @@
|
||||
<constant name="TRACKER_HAND_RIGHT" value="2" enum="TrackerHand">
|
||||
This tracker is the right hand controller.
|
||||
</constant>
|
||||
<constant name="TRACKER_HAND_MAX" value="3" enum="TrackerHand">
|
||||
Represents the size of the [enum TrackerHand] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
||||
Reference in New Issue
Block a user