yannbouteiller / vgamepad

Virtual XBox360 and DualShock4 gamepads in python
MIT License
169 stars 21 forks source link

y_value of the joystick behaves differently on Linux and Windows #28

Open Seraphli opened 5 months ago

Seraphli commented 5 months ago

The behavior of the y-axis for both the left and right joysticks is opposite. I am using left_joystick_float and right_joystick_float. On Windows, I need to set the y_value to 1.0 to move the character forward, but on Linux, I need to set it to -1.0.

yannbouteiller commented 5 months ago

Windows has a very neat way of supporting gamepads, but Linux is messy. We tried to reproduce the evdev events of real DS4 controllers, and depending on the application these events are interpreted differently (for instance, pygame does not properly recognize the order and orientation of axes / buttons of real gamepads on Linux).

Seraphli commented 5 months ago

Oh I forgot to metion that I'm using VX360Gamepad. Currently I just write another class to override joystick control.