input.getRawJoystickButtonState

Section: Input, Touch / Gamepad

What it does

input.getRawJoystickButtonState reads RawJoystickButtonState on an input object. It takes idx and btn.

Signature

input.getRawJoystickButtonState(idx, btn)

Arguments

  • idx
  • btn

Example · generated

function update(dt) {  const rawJoystickButtonState = input.getRawJoystickButtonState(0, 1);}

input.getRawJoystickButtonState is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.

29 members in input