getButtonDown()
world.input.getButtonDown(input, gamepadIdx)
Description
Returns true during the frame the user pressed down the button mapped to the index (https://www.w3.org/TR/gamepad/#remapping)
Parameters
Property | Type | Description |
---|---|---|
input | number | Name of the action map. |
gamepadIdx (optional) | number | Gamepad index. |
Returns
Boolean.
Example
world.input.getButtonDown(1)