PistonDevelopers/piston-examples

Testing joystick with "user_input" example

bvssvni opened this issue · 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

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

you beat me to it! :)

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

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.

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

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

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

https://github.com/Arvamer/gilrs

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