-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add some deadzone for joypad motion detection #3
Conversation
Thanks for working on this. I didn't see this behavior with my controllers, so I didn't realize this could be a problem.
I'm not sure what the best way to do this is, either. For now, what I'd recommend is declaring a new variable in godot-input-prompts/addons/input_prompts/input_prompt_manager.gd Lines 35 to 45 in c494069
If there was something like a |
I've been looking at this a bit more recently, and discovered two things of interest:
I still need to figure out exactly how to do this, but ProjectSettings seems like the right place to expose an InputPrompt-specific deadzone value. |
Prior to this change, if there was both a keyboard and joypad connected and the user was using the keyboard, but there was some stick drift with the joypad, input detection would bounce between keyboard and joypad. This change adds a minimum axis_value that a InputEventJoypadMotion must have before being detecting the input type as a joypad.
c416437
to
7dcee8f
Compare
@raganw: I think I got this working with ProjectSettings, so the value is configurable without touching any of the plugin code. See below: I tested this on my Steam Deck (which, it turns out, has a small amount of stick drift!) and things seem to work. But I'd appreciate it if you could take a look and confirm that everything is working as expected before I merge it in. |
Ensures that it shows up by default.
@Pennycook - Thanks for shepherding this change. I confirmed that this works with the project I was working on and it looks good. I merged in |
You're very welcome. Thank you for identifying the issue, providing the fix, and for helping out with testing. It's merged! 🎉 |
Prior to this change, if there was both a keyboard and joypad connected and the user was using the keyboard, but there was some stick drift with the joypad, input detection would bounce between keyboard and joypad.
This change adds a minimum axis_value that a InputEventJoypadMotion must have before detecting the input type as a joypad.
Ideally, it seems like this deadzone should be configurable, but I'm new to Godot and its plugin architecture and couldn't quite figure out how best to surface that as customizable.