-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
iOS input delay on exports from 3.2.3 #42164
Comments
See also #41452. Can you reproduce this on Godot 3.2.2? |
No; I just exported the same Multitouch View Demo project using 3.2.2 and it ran perfectly on both devices. I'll try 3.2.3-rc4 to see if it's related to #41452. Edit: Delay occurs in 3.2.3-rc4 as well. |
The delay is 150ms same as iOS's delay for some native views. Related code is in: https://github.com/godotengine/godot/blob/3.2/platform/iphone/gl_view_gesture_recognizer.m The issue linked above (#41452) also has the discussion on why it's working this way now and why the problem from that issue occurred. The delay could probably be lowered a little, but this would require testing with project from initial issue. |
Thanks for your response. I'm not sure I understand though. Is there really no way to detect an iOS tap before 150ms have passed? It seems like this would break the responsiveness of a lot of games. It's very noticeable. Is there any workaround to get iOS input faster? |
As I previously said, if you release the touch before 150ms delay, touch events would fire immediately, so 150ms delay basically has no effect on input. I haven't found any issue with my iOS project with this implementation. With 3.2.2 I had to make a workarounds so game would correctly handle taps. |
Sorry, maybe "tap" was the wrong word. I have a project where you press and hold to move. There's no gesture or release to trigger further input, so I relied on the initial event. Worked great in 3.2.2, but now with the delay I need to find a workaround. |
It's more like press and hold then. :) |
@mtk4000 I've made some modifications in this branch - https://github.com/naithar/godot/tree/feature/ios-delay-in-settings. You'll have to build both iOS library and Engine Editor. |
Works great. Thank you very much for your help. |
That's great. I'll try to make PR soon, so this would make into 3.2.4. |
Having the same issue here since I moved to 3.2.3, how can I solve that without needing to re-compile the engine? |
No, you can't, for now you have to rebuild the engine. You can wait for Godot 3.2.4 beta or RC1 and migrate to it once it's out. |
Will do, thanks! |
I get this problem as well, also don't have the experience to rebuild the engine. Any idea when the RC is gonna be released? I get an error when exporting to iOS from the 3.2.4 beta (AOT Compilation exited with code 134), but I need this issue fixed asap. |
Are you using Mono build with C#? |
Yes @naithar, on MacOS. |
Well, the fix for this issue is merged and should be in beta, but I can't help you with Mono build. |
A RC can't be released right after a beta which apparently doesn't work ;) Please open an issue about this AOT compilation failure. |
I'm having this issue on 3.2.3-stable-release. I can't use v3.2.4 rc3 because I'm using a few plugins that may not be compatible with it. Game crashes if I use prebuilt versions of the plugins and some are not compiling for v3.2.4 rc3. I was trying to find the "ios-delay-in-settings" branch, but it's missing. Is there any way I can have access to it or at least the changes I need to make to add this feature? Thanks. |
The PR that's linked to this issue #42457 has the changes you need. |
The problem is still present in 3.5.1, at least for systems that use InputDefault, such as TouchScreenButton. If I understand the current solution correctly, for short taps it will fire the presses at the same time (just before) the releases. So for something using InputDefault, action_press() will be called just before action_release(), and then Input.is_action_pressed() will always return false for presses shorter than 0.15s, which is very long. |
Also confirming that this is still in issue in 3.5.3. Is there any path forward here or is this a hard platform limitation? |
Nevermind, I set the input_devices/pointing/ios/touch_delay project setting to 0, and all works well! Out of curiosity, why have this setting at all, or at least, why not set it to 0 by default? Even using NSTimer to delay it by 0 seconds causes it to not be dispatched immediately, but rather, schedule it for the next run of the event queue (which is still in practice fast enough for the user not to notice, but still). It's a strange default since (to noobs like me) it makes it seem like there's something wrong with Godot or the system making it feel laggy even in a simple scene, which is off putting. |
To my knowledge, the default touch delay is in place so that double-taps can be recognized. Setting it to 0 by default would prevent double-taps from registering. Also, changing a default project setting's value would break compatibility with existing projects, so the change would have to be applied to newly created projects only by modifying the |
Godot version:
3.2.3.stable.official
OS/device including version:
Issue is present on two devices I've tested:
Issue description:
There is a noticeable delay (~250ms) between the time the screen is tapped and the time _input(event) fires.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: