-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
[Android] 'InputEventScreenTouch' not detected for fast multiple touches #67033
Comments
I debugged the problem further, It seems that even if you disable Emulate Touch From Mouse and Emulate Mouse From Touch, when you double tap on touch screen, the second touch is falsely interpreted as Just use a function similar to this as
|
@RandomShaper @ehsanngp The logic to detect and handle double-click within Godot has now been fixed (was broken before) and so what you're seeing is the correct behavior. The second double-click is correctly detected and turned into an @ehsanngp You'd want to update your logic to query for that event now. |
@m4gr3d, I still think that on Android you can't anymore get quick taps in a row. My game is unplayable now as a result of that (once I rebased my Godot fork on top of the current 3.x branch) and I tracked the issue down to the counterpart of #65434 for 3.x. Removing double tap handling from the newly added Android code does the trick. |
@RandomShaper Quick taps should work as expected, the same logic is used to drive double-click handling in the Godot Android Editor, and double-click using either mouse or finger works as expected regardless of the speed. The issue with your game may be similar to @ehsanngp's issue. It's likely that you're expecting and parsing a second |
My game is not reacting to mouse but touch. There's a |
@RandomShaper Then that's another issue; specifically that The There's a couple of paths here:
I'm unfortunately short on time at the moment so I won't be able to get to it for a bit, but would review any proposed PR that addresses option 1. |
I don't see how either of the approaches would fix the issue. We don't need that |
@m4gr3d I think the problem should not have been closed as it is currently working wrong by design.
It seems logically wrong in terms of design that I receive the first InputEventScreenTouch in any case (using any combo of emulation turned on/off), but do not receive the second InputEventScreenTouch in some case. That said, the problem seems two folded: |
That is where the design problem lies, ALL InputEventMouseButton should always be propagated immediately regardless of emulation settings. |
I'll second that. |
@ehsanngp PR #67607 adds a |
Godot version
4.0 Beta 2
System information
Ubuntu 16.04
Issue description
I have used custom code in previous versions (up until 4.0 Beta 1) to detect double-click on touch screen on Android.
I suspected that same code does not work in 4.0 Beta 2. After watching the logs it seems the second touch press is not getting detected if it is fast (less than a second or so).
Steps to reproduce
TextureRect
._unhandled_input
orgui_input
.Emulate Touch From Mouse is always turned off
The bug occurs either the Emulate Mouse From Touch is turned off or on
Minimal reproduction project
TouchTest.zip
Use your owns keystores, usernames and passwords
The text was updated successfully, but these errors were encountered: