Open ImAReplicant opened 4 years ago
I just tried this with a PS4 controller but couldn't replicate it. Maybe I just can't switch directions as fast as I used to... I thought it might be worth mentioning that I have had some pretty surprising behaviour with controllers before, when Steam is running. Something to do with the steam input customisation fighting the system input drivers, perhaps.
(on a reasonably up to date Arch Linux, Godot 3.2.3, bluetooth controller)
Yeah on a PS4 controller it's harder to reproduce but after several tries the bug appears anyway. On a switch pro controller or xbox 360 controller, it's much easier, probably due to the design of the D-Pad :
For Steam I don't know if it's the problem but I have the same bug with or without Steam open.
I can't reproduce this on Godot 3.2.3 (Fedora 31, Xbox One V3 controller in wired mode).
I tested on Windows with Xbox 360 and PS4 controllers and I can't reproduce the bug. I could not test with the Nintendo Switch controller because there is no Windows driver.
So I'm lost, it would be a problem with Linux drivers ?
I wonder if the bug is due to input accumulation…
@ImAReplicant Try calling Input.set_use_accumulated_input(false)
in the _ready()
function of any script of the Joypads demo and see if the situation improves.
Always the same bug after the modification.
I'm not sure how Godot reads/receives gamepad input but AFAIK, via evdev or /dev/input/js*, a D-Pad (hat switch) cannot report opposite directions simultaneously. There's 2 values, for X & Y, essentially a 2 axis joystick. You can run test utilities like evtest or jstest to see this.
It might be worth testing with udev as well. By default, Godot is built without udev support as its presence isn't guaranteed on all Linux distributions. If you can compile Godot from source, install udev development libraries then pass the udev=yes
SCons option when building the editor. Once this is done, run the Joypads demo with the freshly compiled editor binary (which is in bin/
).
(Make sure to compile the 3.2.3-stable
tag for better reproducibility by running git checkout 3.2.3-stable
in the cloned repository.)
@quinnyo Indeed I tested with the 2 utilities and the D-pad is recognized as an axis (ABS_HAT0X and ABS_HAT0Y)
@Calinou Okay, I'll try that.
Edit : I still have the same problem with godot built with udev
I get this same problem on Ubuntu 20.10 with the Godot 3.2.3 binary release. I'm using an Xbox 360 controller and don't have Steam installed. It happens frequently enough to make challenging segments unplayable with the D-pad.
Notably, this never happened when I used Godot on Windows 7 with the exact same hardware.
By default, Godot is built without udev support as its presence isn't guaranteed on all Linux distributions.
FYI, official Godot binaries have always been built with udev enabled. Custom builds weren't until a few months ago.
Hi, I may have run in to the same issue as the one described, is there a fix or workaround for this issue?
It may happen on specific controllers, similar to #66878.
If it is convenient, you can use evtest
/evemu-record
to test the keycode mapping of the controller on Linux.
Godot version:
Godot 3.2.3 and 3.2.2
OS/device including version:
Arch Linux
Issue description:
Change quickly the direction on D-Pad of gamepad doesn't released the first direction. Tested with Xbox Controller, Dualshock 4 and Nintendo Switch Controller
Steps to reproduce: Download the "Joypads Demo / Tools" and quickly switch from left to right or top to bottom for example, both directions remain pressed :