Add support for joypad button echo events - #117782
Conversation
a866bc5 to
afe75f5
Compare
I would just reuse the same deadzone as the regular action. If you hold an axis at a position where the input would be sent, it should also echo eventually. |
But the thing is, |
b182fcf to
bbf41e6
Compare
There was a problem hiding this comment.
Tested locally, it mostly works as expected.
Some feedback:
-
Echo events don't work for focus navigation, or Tree/ItemList navigation. I would expect echo events to be followed in both cases to match other games/engines.
- In contrast, it works with keyboard-based navigation (try holding down Tab).
-
The repeat timer should ignore
Engine.time_scale, as currently, using a higher time scale will speed up the rate at which echo events are sent (as well as reduce the initial delay before the first echo event). You can test this by using--time-scale 5in the Main Run Args project setting.
|
Although now that I think about it, should we really have axis echo events? I mean, they have to share the same deadzone for all actions, otherwise we have to introduce a different type of echo events (most likely |
This PR adds the code in `Input` class to send joypad echo events if they are enabled in the project settings.
|
I decided to remove joypad axis echo events for now, I think we need to discuss this part more since there are several approaches to do it.
That's strange, because button echo events for just fine for me. Did you try to use the sticks for navigation? In that case, yes, they weren't supposed to work at the moment, and now they're removed, so I think it's hopefully not a problem for now. :D 2026-06-24.16-08-14.mp4
Fixed! |
This PR adds the code in
Inputclass to send joypad echo events for buttonsThis PR adds 3 new project settings:
input_devices/joypads/joypad_echo_events/send: Iftrue, the engine will send joypad echo events after the user has pressed the joypad buttons or moved the joypad axes for long enough,falseby default for existing projects andtrueby default for newly created projects;input_devices/joypads/joypad_echo_events/wait_time: The amount of time of pressing the joypad buttons or keeping the joypad axes over the deadzone required for the engine to start sending echo events, in seconds,0.5by default;input_devices/joypads/joypad_echo_events/count_per_second: The number of times per second joypad echo events should be sent by the engine after the user has pressed the buttons or kept the axes over the deadzone for long enough,20by default;2026-04-14.22-17-37.mp4
This PR also works with high numbers of echo events per second that are set via
input_devices/joypads/joypad_echo_events/count_per_second. Here I set it to1000, you can see that the counter increases by 1000 every second:2026-04-14.22-18-08.mp4
TODO:
InputEventJoypadButton.is_echo()+ProjectSettings.input_devices/joypads/send_joypad_echo_eventsProjectSettings.input_devices/joypads/joypad_echo_events_wait_timeProjectSettings.input_devices/joypads/joypad_echo_events_count_per_secondInput::_process()in the main/rendering step instead of the physics stepProjectSettings.input_devices/joypads/send_joypad_echo_eventsby default for new projects?