new Gamepad()
- See:
Properties:
Name | Type | Description |
---|---|---|
displayId |
The id of the VR display this gamepad is associated with, if any. |
|
id |
The gamepad's id. |
|
index |
The gamepad's index. This matches the index in the array returned by |
|
mapping |
The mapping the user agent applies to the buttons. If not "standard", the input may not behave as expected. If this is a specific type of gamepad or controller, you may want to provide custom mapping based on its id. |
|
axisDeadzone |
The range for the axes to be considered "0". This assumes a default controller scheme where |
|
hand |
Either |
Members
-
<static> A
-
The bottom button in the right cluster. On PS: Cross.
-
<static> B
-
The right button in the right cluster. On PS: Circle.
-
<static> BACK
-
The back/select button.
-
<static> DPAD_DOWN
-
The down button on the directional pad.
-
<static> DPAD_LEFT
-
The left button on the directional pad.
-
<static> DPAD_RIGHT
-
The right button on the directional pad.
-
<static> DPAD_UP
-
The up button on the directional pad.
-
<static> L3
-
The left analog stick pressed down.
-
<static> LB
-
The top left trigger/bumper. On PS: L1.
-
<static> LT
-
The bottom left trigger. On PS: L2.
-
<static> PRESS
-
Combine with a button name to indicate that the action is only interested in the pressed state, not the analog value:
gamepad.map(name | Gamepad.PRESSED, "action")
-
<static> R3
-
The right analog stick pressed down.
-
<static> RB
-
The top right trigger/bumper. On PS: R1.
-
<static> RT
-
The bottom right trigger. On PS: R2.
-
<static> START
-
The start button.
-
<static> STICK_LX
-
The horizontal axis of the left analog stick.
-
<static> STICK_LY
-
The vertical axis of the left analog stick.
-
<static> STICK_RX
-
The horizontal axis of the right analog stick.
-
<static> STICK_RY
-
The vertical axis of the right analog stick.
-
<static> TOUCH
-
Combine with a button name to indicate that the action is interested in the touched state, if the gamepad supports this.
gamepad.map(name | Gamepad.TOUCHED, "action")
-
<static> X
-
The left button in the right cluster. On PS: Square.
-
<static> Y
-
The top button in the right cluster. On PS: Triangle.