piston-examples icon indicating copy to clipboard operation
piston-examples copied to clipboard

Testing joystick with "user_input" example

Open bvssvni opened this issue 10 years ago • 8 comments

Editing the "user_input" example to test joystick events with the SDL2 window backend. I'm using a PS3 controller connected to a mac.

Here is the input button mapping:

PS3 controlller

bvssvni avatar Oct 02 '15 12:10 bvssvni

Joystick axis is a bit harder to read. Could draw the input visually.

bvssvni avatar Oct 02 '15 12:10 bvssvni

you beat me to it! :)

xaviershay avatar Oct 02 '15 23:10 xaviershay

I was trying to connect via Bluetooth and Firefox crashed. Wat.

bvssvni avatar Oct 03 '15 14:10 bvssvni

PS3 controller via Bluetooth works now. Here is what I did on OSX 10.9.5:

  1. Enable Bluetooth in Systems Preferences.
  2. Connect the PS3 controller via USB.
  3. Click at the Bluetooth icon in the top bar, select the MAC address (I had to guess) and then -> Connect.
  4. Disconnect the USB cable.
  5. Hold the button with PlayStation logo down for 1-2 seconds.
  6. Start the "user_input" example.

bvssvni avatar Oct 03 '15 14:10 bvssvni

I have a PlayStation Move controller as well, but it doesn't work yet.

bvssvni avatar Oct 03 '15 14:10 bvssvni

The user_input example doesn't see my xbox360 controller input at all. What can I do? I'm on Windows 10

ffigiel avatar Aug 11 '18 19:08 ffigiel

Exact same situation as @megapctr... is it because glutin doesn't suppoort gamepad input? Would an SDL2 backend work?

cedric-h avatar Sep 01 '18 19:09 cedric-h

https://github.com/Arvamer/gilrs

This lib works quite well for me, do keep in mind however that it doesn't have Mac support.

cedric-h avatar Sep 01 '18 20:09 cedric-h