react-gamepad icon indicating copy to clipboard operation
react-gamepad copied to clipboard

Axis 6 and 7 buttons are not configured to implement

Open gowdruNikhil opened this issue 7 years ago • 3 comments

Hi i am using XBOX 360 to move robot but i need to make use of Axis 6 and Axis 7 button which are according to this link html5gamepad

please provide a support or if am not aware of it let me know how to make use of it.

thank you

gowdruNikhil avatar Nov 26 '18 05:11 gowdruNikhil

I think it should already be working. use onAxisChange, it should be called with LeftTrigger and RightTrigger when using the triggers (axis 6 and 7). If it doesn't work then have a look at the layout file. I can't recall how I implemented it, so maybe add LeftTrigger and RightTrigger at index 6 and 7 of the axis array.

SBRK avatar Nov 27 '18 12:11 SBRK

@SBRK am not asking about the left side joystick (LeftTrigger). please refer the link i posted (html5gamepad) and

check the below image in that number 2 button is what i required. Image Link

gowdruNikhil avatar Nov 30 '18 09:11 gowdruNikhil

The number 2 in what you passed is the D-Pad, what does it have to do with the Axis ? Just use onUp, onDown etc https://github.com/SBRK/react-gamepad#onup

SBRK avatar Dec 03 '18 15:12 SBRK