getButton()
world.input.getButton(input, gamepadIdx)
Description
Returns true while the virtual button identified by buttonName is held down.
Parameters
Property | Type | Description |
---|---|---|
input | number | Name of the action map. |
gamepadIdx (optional) | number | Gamepad index. |
Returns
Boolean.
Example
world.input.getButton(1)