Darnoman / Godot-GlobalInput-Addon

MIT License
13 stars 3 forks source link

Just Pressed action not working properly? #1

Closed Gurkgamer closed 6 months ago

Gurkgamer commented 6 months ago

Hello,

I've installed the addon in Godot 4.2.1, and I've being testing it. Overall it seems to work nicely, but I found that in some situations it just doesn't seems to fire in the expected behavior. Not that it creates a problem for now, but just to list the issue,

When I'm checking both "pressed" and "just pressed" behavior, only the pressed one fires (thats expected?).

image

If I only leave the just pressed check, the "just pressed" behavior fires properly.

image

But, if I keep both checks, but I don't print the "Pressed" debug, I found out that very so often, the "JUST PRESSED" message appears. Like once every 100 pressed or so, and I have to keep the button held.

image

I'm trying to understand what the code does to check if I can figure it out (New in this programming thing), but i would like to tell this problem in hopes someone can help.

Darnoman commented 6 months ago

I recently rewrote the plugin might be a recently introduced bug. I’ll fix it when I’m able to I’ll let reply here once it’s fixed

Darnoman commented 6 months ago

Alright I fixed it. When I rewrote it, what happened was I forgot to change the name of the state key in my action dictionary and so they were overlapping with each other. If you download it again(latest git push) it should work. Let me know if you find any other issues.