0 votes

This problem only happens on mobile, not on PC. If I tap the screen too quickly, only the release gets registered. For the press to get registered I have to hold the screen for some 0.3 seconds. This is an issue.

if event is InputEventScreenTouch or event is InputEventMouseButton:
    if event.pressed:
        # Takes 0.3 seconds to execute
    else:
        # No lag
in Engine by (23 points)

Can you post more code / print statements ?

Also did u try it on different Android devices ?
Some cheap / old android are very sluggish to say the least (talking independent of Godot).

1 Answer

0 votes
Best answer

The program was double tapping the input because I had mouse emulation on as per default settings. These resulted in 2 presses and then 2 releases. And because the code was a little slow, before the program could even advance by one frame. Due to that, all sorts of unintended things happened.

Solution was to prevent code from running twice, and I also added a removechild before queuefree on relevant code to prevent it from being selected multiple times. Making the code faster also eliminates the problem since then you physically can't press and release on the same frame.

by (23 points)
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 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 webmaster@godotengine.org with your username.