0 votes

Hey all,

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?

Godot version 3.4.1
in Engine by (35 points)

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.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.