Skip to content

gamepad.moveRightStick

gamepad.moveRightStick(x: number, y: number): Promise<void>

Section titled “gamepad.moveRightStick(x: number, y: number): Promise<void>”

Moves the right analog stick to a specific position.

The stick coordinates must be values between -1 and 1.

  • x — horizontal axis (left -1 to right 1)
  • y — vertical axis (up -1 to down 1)
describe('Gamepad tests', function () {
it('Moves the right analog stick', async () => {
const gamepad = await gf.createGamepad();
await gamepad.moveRightStick(-0.8, 0.3);
});
});