Closed jacobcdewitt closed 4 years ago
The term "grip" is used in the WebXR API as part of gripSpace
, to refer to the point in the user's controller or hand at the center of the user's grip.
As used so far in the input profiles registry, "grip" is referring to the button/trigger on the side of the controller pressed when the user squeezes the controller. While this button often happens to be near the origin of gripSpace
, it's logically a distinct concept.
OpenXR hit the same conflict, trying to name both the "grip pose" and "grip button", especially given that some controllers like the Valve Index Controllers have a force sensor rather than either a button or trigger.
In exploring that, we noticed the term "squeeze" was being used in industry to represent this input on controllers. For example, the Valve Index Controllers page refers to its force sensor with the heading "Squeeze-ability", talking about how it is:
tuned to detect a wide range of forces from a light touch to a firm squeeze.
Ultimately, we ended up going with the following names in OpenXR across "grip" poses and "squeeze" components:
/user/hand/right/input/grip/pose
/user/hand/right/input/squeeze/value
Using "squeeze"
in WebXR for the grip component would result in the following generic profile names:
generic-button
generic-touchpad
generic-trigger
generic-trigger-squeeze
generic-trigger-squeeze-thumbstick
generic-trigger-squeeze-touchpad
generic-trigger-squeeze-touchpad-thumbstick
generic-trigger-thumbstick
generic-trigger-touchpad
generic-trigger-touchpad-thumbstick
This would result in the following button mapping for "xr-standard"
:
Buttons | xr-standard Mapping |
Required |
---|---|---|
buttons[0] | Primary Press | Yes |
buttons[1] | Secondary/Squeeze Press | No |
buttons[2] | Touchpad Press | No |
buttons[3] | Thumbstick Press | No |
Thoughts?
I agree using "squeeze" instead of "grip" here would make things less ambiguous. While we encounter things like "grip pose" and "grip space", I doubt we will ever have to deal with something like "squeeze space".
"squeeze space" hahaha! Love it.
I'm supportive of this change and will throw together a PR
In the section of the spec for the xr-standard gamepad mapping https://immersive-web.github.io/webxr/#xr-standard-gamepad-mapping , it lists buttons[1] as "Secondary Button/Grip Trigger". This could be ambiguous because typically the trigger is only considered to be associated with the index finger and what fires a select event.