Example: Joystick Sensitivity Threshold
Adjust the level of sensitivity for the axe/joystick, then move the primary axe (see diagram of layout), and see when when the action would trigger (the circle will turn green).
1.00
How it works
Changing the axe/joystick sensitivity with gameController.js is really simple. Use
.set(PROPERTY, VALUE)
to change the value of "axeThreshold"
The passed value can range from 0 to 1, and it can be set at the gamepad
level
or at the gameControl
level (and all the gamepads will be updated with that
value.) Here is an example of how it can be done:
gameControl.on('connect', function(gamepad) {
// all the existing gamepads will have a threshold of 0.75
this.set('axeThreshold', 0.75);
// the newly detected gamepad will have a threshold of 0.5
gamepad.set('axeThreshold', 0.5);
});