0.2.0-dev Download ZIP
70 lines ·3.8 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="XRNode3D" inherits="Node3D" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | A 3D node that has its position automatically updated by the [XRServer]. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | This node can be bound to a specific pose of an [XRPositionalTracker] and will automatically have its [member Node3D.transform] updated by the [XRServer]. Nodes of this type must be added as children of the [XROrigin3D] node. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link> |
| 11 | </tutorials> |
| 12 | <methods> |
| 13 | <method name="get_has_tracking_data" qualifiers="const"> |
| 14 | <return type="bool" /> |
| 15 | <description> |
| 16 | Returns [code]true[/code] if the [member tracker] has current tracking data for the [member pose] being tracked. |
| 17 | </description> |
| 18 | </method> |
| 19 | <method name="get_is_active" qualifiers="const"> |
| 20 | <return type="bool" /> |
| 21 | <description> |
| 22 | Returns [code]true[/code] if the [member tracker] has been registered and the [member pose] is being tracked. |
| 23 | </description> |
| 24 | </method> |
| 25 | <method name="get_pose"> |
| 26 | <return type="XRPose" /> |
| 27 | <description> |
| 28 | Returns the [XRPose] containing the current state of the pose being tracked. This gives access to additional properties of this pose. |
| 29 | </description> |
| 30 | </method> |
| 31 | <method name="trigger_haptic_pulse"> |
| 32 | <return type="void" /> |
| 33 | <param index="0" name="action_name" type="String" /> |
| 34 | <param index="1" name="frequency" type="float" /> |
| 35 | <param index="2" name="amplitude" type="float" /> |
| 36 | <param index="3" name="duration_sec" type="float" /> |
| 37 | <param index="4" name="delay_sec" type="float" /> |
| 38 | <description> |
| 39 | Triggers a haptic pulse on a device associated with this interface. |
| 40 | [param action_name] is the name of the action for this pulse. |
| 41 | [param frequency] is the frequency of the pulse, set to [code]0.0[/code] to have the system use a default frequency. |
| 42 | [param amplitude] is the amplitude of the pulse between [code]0.0[/code] and [code]1.0[/code]. |
| 43 | [param duration_sec] is the duration of the pulse in seconds. |
| 44 | [param delay_sec] is a delay in seconds before the pulse is given. |
| 45 | </description> |
| 46 | </method> |
| 47 | </methods> |
| 48 | <members> |
| 49 | <member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" overrides="Node" enum="Node.PhysicsInterpolationMode" default="2" /> |
| 50 | <member name="pose" type="StringName" setter="set_pose_name" getter="get_pose_name" default="&"default""> |
| 51 | The name of the pose we're bound to. Which poses a tracker supports is not known during design time. |
| 52 | Godot defines number of standard pose names such as [code]aim[/code] and [code]grip[/code] but other may be configured within a given [XRInterface]. |
| 53 | </member> |
| 54 | <member name="show_when_tracked" type="bool" setter="set_show_when_tracked" getter="get_show_when_tracked" default="false"> |
| 55 | Enables showing the node when tracking starts, and hiding the node when tracking is lost. |
| 56 | </member> |
| 57 | <member name="tracker" type="StringName" setter="set_tracker" getter="get_tracker" default="&"""> |
| 58 | The name of the tracker we're bound to. Which trackers are available is not known during design time. |
| 59 | Godot defines a number of standard trackers such as [code]left_hand[/code] and [code]right_hand[/code] but others may be configured within a given [XRInterface]. |
| 60 | </member> |
| 61 | </members> |
| 62 | <signals> |
| 63 | <signal name="tracking_changed"> |
| 64 | <param index="0" name="tracking" type="bool" /> |
| 65 | <description> |
| 66 | Emitted when the [member tracker] starts or stops receiving updated tracking data for the [member pose] being tracked. The [param tracking] argument indicates whether the tracker is getting updated tracking data. |
| 67 | </description> |
| 68 | </signal> |
| 69 | </signals> |
| 70 | </class> |