Scripting

Search The Documentation:

  1. Home
  2. Docs
  3. Scripting
  4. Input
  5. checkGamepad

checkGamepad

Platform Compatibility

PC Mac OSX Oculus Quest
X X

Check gamepad button (1 – 19) down on specified gamepad (1 – 8), 0 for any gamepad

Default Xbox controller buttons:

Button Button Number
A 0
B 1
X 2
Y 3
Left Bumper 4
Right Bumper 5
View (Back) 6
Menu (Start) 7
Left Stick Button 8
Right Stick Button 9

Parameters:

  • button
    • An integer value
  • gamepad Optional
    • An integer value

returns a Boolean (true or false) value

Example:

1
obj.checkGamepad(button, gamepad)
Tags
Was this article helpful to you? Yes No

How can we help?