diff options
author | Bastiaan Olij <mux213@gmail.com> | 2023-01-22 13:17:20 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2023-01-23 11:26:12 +1100 |
commit | 52d4a56b3b28a07faf4ee90001d8269f4179f8e3 (patch) | |
tree | 89130fcd0a04a808fd721081b128488660f80aee /doc/classes | |
parent | c3539b4561f9b4d7dc4ba1c5859217e7fbf9c6fe (diff) |
Rename getters and signals on XR nodes to be consistant with input types
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/XRController3D.xml | 31 | ||||
-rw-r--r-- | doc/classes/XRPositionalTracker.xml | 12 |
2 files changed, 25 insertions, 18 deletions
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml index 9e192177e5..0b21002893 100644 --- a/doc/classes/XRController3D.xml +++ b/doc/classes/XRController3D.xml @@ -13,11 +13,18 @@ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link> </tutorials> <methods> - <method name="get_axis" qualifiers="const"> - <return type="Vector2" /> + <method name="get_float" qualifiers="const"> + <return type="float" /> <param index="0" name="name" type="StringName" /> <description> - Returns a [Vector2] for the input with the given [param name]. This is used for thumbsticks and thumbpads found on many controllers. + Returns a numeric value for the input with the given [param name]. This is used for triggers and grip sensors. + </description> + </method> + <method name="get_input" qualifiers="const"> + <return type="Variant" /> + <param index="0" name="name" type="StringName" /> + <description> + Returns a [Variant] for the input with the given [param name]. This works for any input type, the variant will be typed according to the actions configuration. </description> </method> <method name="get_tracker_hand" qualifiers="const"> @@ -26,11 +33,11 @@ Returns the hand holding this controller, if known. See [enum XRPositionalTracker.TrackerHand]. </description> </method> - <method name="get_value" qualifiers="const"> - <return type="float" /> + <method name="get_vector2" qualifiers="const"> + <return type="Vector2" /> <param index="0" name="name" type="StringName" /> <description> - Returns a numeric value for the input with the given [param name]. This is used for triggers and grip sensors. + Returns a [Vector2] for the input with the given [param name]. This is used for thumbsticks and thumbpads found on many controllers. </description> </method> <method name="is_button_pressed" qualifiers="const"> @@ -54,18 +61,18 @@ Emitted when a button on this controller is released. </description> </signal> - <signal name="input_axis_changed"> + <signal name="input_float_changed"> <param index="0" name="name" type="String" /> - <param index="1" name="value" type="Vector2" /> + <param index="1" name="value" type="float" /> <description> - Emitted when a thumbstick or thumbpad on this controller is moved. + Emitted when a trigger or similar input on this controller changes value. </description> </signal> - <signal name="input_value_changed"> + <signal name="input_vector2_changed"> <param index="0" name="name" type="String" /> - <param index="1" name="value" type="float" /> + <param index="1" name="value" type="Vector2" /> <description> - Emitted when a trigger or similar input on this controller changes value. + Emitted when a thumbstick or thumbpad on this controller is moved. </description> </signal> </signals> diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml index db2910f25e..93e6a5497c 100644 --- a/doc/classes/XRPositionalTracker.xml +++ b/doc/classes/XRPositionalTracker.xml @@ -92,18 +92,18 @@ Emitted when a button on this tracker is released. </description> </signal> - <signal name="input_axis_changed"> + <signal name="input_float_changed"> <param index="0" name="name" type="String" /> - <param index="1" name="vector" type="Vector2" /> + <param index="1" name="value" type="float" /> <description> - Emitted when a thumbstick or thumbpad on this tracker moves. + Emitted when a trigger or similar input on this tracker changes value. </description> </signal> - <signal name="input_value_changed"> + <signal name="input_vector2_changed"> <param index="0" name="name" type="String" /> - <param index="1" name="value" type="float" /> + <param index="1" name="vector" type="Vector2" /> <description> - Emitted when a trigger or similar input on this tracker changes value. + Emitted when a thumbstick or thumbpad on this tracker moves. </description> </signal> <signal name="pose_changed"> |