gamepad

manages input from up to gamepad 4

virtuosity.inputManager.gamepad

Methods


Methods

leftX

get the left joystick current X position

virtuosity.inputManager.gamepad.leftX(id);


Parameter Type Description
id Int id of the gamepad (0-3)

leftY

get the left joystick current Y position

virtuosity.inputManager.gamepad.leftY(id);


Parameter Type Description
id Int id of the gamepad (0-3)

rightX

get the right joystick current X position

virtuosity.inputManager.gamepad.rightX(id);


Parameter Type Description
id Int id of the gamepad (0-3)

rightY

get the right joystick current Y position

virtuosity.inputManager.gamepad.rightY(id);


Parameter Type Description
id Int id of the gamepad (0-3)

button

return value of a controller button

virtuosity.inputManager.gamepad.button(id, btn);


Parameter Type Description
id Int id of the gamepad (0-3)
btn String which button to check

button > btn

button types



Option Description
"A" A Button
"B" B Button
"X" X Button
"Y" Y Button
"LB" Left Bumper
"RB" Right Bumper
"LT" Left Trigger
"RT" Right Trigger
"Back" Back Button
"Start" Start Button
"LS" Left Stick Button
"RS" Right Stick Button
"Up" D-pad Up Button
"Down" D-pad Down Button
"Left" D-pad Left Button
"Right" D-pad Right Button
"Home" Home Button (Xbox button)

getConnected

returns [Boolean] of which controllers are connected

virtuosity.inputManager.gamepad.getConnected();