immersive-web / webxr-input-profiles

WebXR Gamepad assets, source library, and schema
https://immersive-web.github.io/webxr-input-profiles
Other
189 stars 50 forks source link

It may be useful to enumerate the shape of the joystick / thumbstick gate #95

Open kearwood opened 4 years ago

kearwood commented 4 years ago

Thumbsticks and joysticks are usually expressed with two axis values such as "x" and "y". These values define the angle of the input; however, there are constraints that cause interactions between the "x" and "y" values due to the physical, logical, or electronic design of such controllers.

The range of motion is limited to an area with various shapes. These shapes are called "gates". Common "gate" shapes include squares, circles, octogons, and crosses.

A common error made by developers is that they test a game using a controller with a circular gate only. Some players with a square gate are then able to move their character faster than the intended speed by moving the stick outside of the circle in a diagonal direction if the values are not normalized to a unit vector and distance. Essentially, users with a square gate can cheat in the game and have an advantage over users with a circular gate.

Another error made by developers is that they test the game with a square gate, requiring discrete positions to be hit in gestures (eg, Street Fighter style "hadooken" combinations). The developer's joystick may be able to reach these target positions, while the end user's joystick is unable to reproduce the input needed to perform the action.

My suggestion is to include in the schema an enumeration of the "gate" shape for each two axis thumbstick or joystick. The actual values of the axis do not need to be normalized to match the gate shapes; however, as manufacturing tolerances can not make such guarantees.

NellWaliczek commented 4 years ago

Ooof. Yeah, this is something I was concerned about a while back and as a work around to the cheating thing, the library actually constrains movement to a circle. That said, does any xr hardware today do anything but circle? If not, I'm inclined to move to Future. Shout if that's wrong.