-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify XRController3D
get_input
name corresponds to actions in the action set
#104103
base: master
Are you sure you want to change the base?
Conversation
XRController3D
get_input
name corresponds to actions in the action set
Thanks! However, this is only true for OpenXR. With WebXR or any other interface from GDExtension, there is no action map. So, if we add something like this, it should specifically mention OpenXR |
For the other interfaces, is there any standard wording for what name the input is? The current documentation feels a bit vague and unclear, especially for OpenXR (which appears to be the most supported XR framework currently). |
The names are defined by the We could maybe write something like "The name of the input is defined by the [XRInterface]. In the case of OpenXR, these are the names of actions for the current action set." We could conceivably also link to some docs on the names of the WebXR inputs, but I don't think we have any yet. :-) |
I wonder if the clarification could be made in the class description, and each method just says to refer to that, rather than having the same description four times. The class description already mentions that inputs are named, so it could just expand upon that. Is there a convention for that sort of thing or should the docs avoid that kind of indirection? |
Sure, we could add it to the class description - it does match the existing note about "a configurable action map" |
9f3e0c6
to
3e23989
Compare
doc/classes/XRController3D.xml
Outdated
@@ -7,7 +7,7 @@ | |||
This is a helper 3D node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers. | |||
Controllers are linked by their ID. You can create controller nodes before the controllers are available. If your game always uses two controllers (one for each hand), you can predefine the controllers with ID 1 and 2; they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add XRController3D nodes to your scene. | |||
The position of the controller node is automatically updated by the [XRServer]. This makes this node ideal to add child nodes to visualize the controller. | |||
As many XR runtimes now use a configurable action map all inputs are named. | |||
As many XR runtimes now use a configurable action map all inputs are named. The name of the input is defined by the current [XRInterface]. In the case of OpenXR, these are the names of actions in the current action set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should just replace the old sentence, since the new stuff basically says the same thing?
With a little elaboration:
As many XR runtimes now use a configurable action map all inputs are named. The name of the input is defined by the current [XRInterface]. In the case of OpenXR, these are the names of actions in the current action set. | |
The names of inputs are defined by the current [XRInterface]. In the case of OpenXR, these are the names of actions in the current action set from the OpenXR action map. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to combine the two sentences, because just having "The names of inputs are defined by the current [XRInterface]" felt a bit off, perhaps because it was in passive voice.
Clarify that the parameter
name
for the methodsget_input
,get_float
,get_vector2
, andis_button_pressed
corresponds to the internal name of an action in the current action map. Current docs call it thename
of an input.