|Attention||Topic was automatically imported from the old Question2Answer platform.|
Been ironing out my controller support. I’m hitting an issue where attempting to navigate my game’s UI is essentially impossible with an analog stick, because tapping the stick creates tons of press events that change focus. Since Godot is changing the focus and not me, there’s not a ton I can do to slow the movement down.
Above is an example of what I’m talking about. Pressing down once causes a flurry of focus changes that make the UI essentially uncontrollable. The problem does not happen with key presses or the D pad.
This is the second time where Godot’s automatic handling of focus has hurt me. The first time was when trying to assign the UI to an active controller in a local multiplayer game- which I’ve handled by sticking the entire game behind a viewport controller that does nothing but filter input events. That’s functional in a pass and play format but obviously doesn’t scale.
In this instance I could do something similar here too and cap joystick events to X times per second to reduce the severity of this problem, but that seems like a solution that absolutely wouldn’t scale to other game types at all. Has anyone encountered this kind of error before? How do you prevent Godot from just yeeting your focus around the second you plug in a controller?
Calinou | 2021-11-15 22:29
Ah, I appreciate the link. I tried searching around yesterday night but couldn’t find anything. In the meantime I’ll try the ghetto joystick fix until the issue is closed.
LemonadeFlashbang | 2021-11-16 00:14