A common bug with the HTML5 Gamepad API is that it sometimes merges multiple buttons into one node (which is hard to prevent given the scope of the API). To combat this, we could let the user split the single node into child nodes of the parent, each with their own range that gets normalized into a percentage.
For example:
D-Pad has 4 buttons but the Gamepad API assigns left+right & up+down into 2 nodes. Given that the left+right node goes to 0 when the left button is pressed, 1 when the right button is pressed and 0.5 when no button is pressed, the user can specify that the node should be split in two:
A common bug with the HTML5 Gamepad API is that it sometimes merges multiple buttons into one node (which is hard to prevent given the scope of the API). To combat this, we could let the user split the single node into child nodes of the parent, each with their own range that gets normalized into a percentage.
For example: D-Pad has 4 buttons but the Gamepad API assigns left+right & up+down into 2 nodes. Given that the left+right node goes to 0 when the left button is pressed, 1 when the right button is pressed and 0.5 when no button is pressed, the user can specify that the node should be split in two: