Skip to content
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

single_taps not recognized after resuming from pause menu #24

Closed
tufduckhotmailcom opened this issue Nov 20, 2022 · 2 comments
Closed

Comments

@tufduckhotmailcom
Copy link

First, excellent plugin! I'm developing a little Tetris game for mobile and have been using your plugin with great success. Up until now. :)

I have made a pause menu for my game now, and using the in-built Godot pause system by setting get_tree().paused = true. And when I resume the game again with get_tree().paused = false, my single finger taps are no longer recognized. Drags and long presses are. Really weird... On the computer it works, but not on the mobile.

I've been looking through InputManager.gd and testing out a few things, but couldn't get it to work no matter what. I really don't know what's causing this. Could there be some timers that are still running in your script even if the game is paused, and they therefore go out of bounds? I see this condtion:

if raw_gesture.elapsed_time < TAP_TIME_LIMIT and distance <= TAP_DISTANCE_LIMIT:
					_emit("single_tap", InputEventSingleScreenTap.new(raw_gesture))

I figured that maybe raw_gesture.elapsed_time was being incremented during pause, but I really have no clue what's going on in your code.

Do you think you could maybe take a look in this?

@Federico-Ciuffardi
Copy link
Owner

I can't reproduce your problem. I tried with the project below where I can change get_tree().paused by pressing the button. I can pause, resume, and then tap with no problem.

GDTIM-pause.tar.gz

Can you provide a minimal project that I can reproduce the bug in? Also, what version of GDTIM and Godot are you using?

@tufduckhotmailcom
Copy link
Author

Thanks for answering! I'm using Godot 3.5.1 stable, and the latest GDTIM 2.1.

I'm currently investigating this a bit more. Honestly, it could very well be my own code that is the source of the issue. In case I won't be able to track down the error I will get back to you with a minimal reproduction project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants