isButtonDown(btn?: TButton | TButton[]): boolean
If any or certain bound button(s) are currently held down on any input (keyboard, gamepad).
param
btn- The button(s) to check.
onUpdate(() => { if (!isButtonDown()) return // early return as no button is held down if (isButtonDown("jump")) debug.log("Player is jumping") if (isButtonDown(["left", "right"])) debug.log("Player is moving") })
since
v3001.0