-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Input.action_just_pressed and Input.action_just_released doesnt work in _physics_process on Android #66318
Comments
I can confirm this on 4.0.beta2. |
I was developing a project with Godot4 beta10 and ran into that same problem. When calling Input.is_action_just_pressed... on android it does not work if it is inside physics_process, it only works inside _process. |
Confirmed bug in Godot 4.0 |
This is still happening. Wish that it is fixed soon. The |
On 4.0.2, this works on desktop when enabling Emulate Touch From Mouse in the advanced Project Settings, so the issue is Android-specific (or Android/iOS). Can you reproduce this in any of the 4.0 alphas to determine when the regression started? I wonder if this was already present in 4.0.alpha1 or not, specifically. |
I'm using |
try 4.0.2 |
Still not working on android |
Confirmed bug in Godot 4.1 |
Is this issue because is_action_just_pressed checks if the input was pressed on this frame where each frame is a call to |
Is the emulation started here? input.cpp#L502 I think because I was going to compare it to a normal |
Sorry I must have missed this bug report. It may be a regression from my PR #77055 . EDIT: No it can't be, as my PR was from June 2023, and this report is from last year! 😁 As @Alex2782 says, this is likely happening because the tick stored for the action is being stored after the The actual problem makes total logical sense if you think about it. Every physics tick you have an opportunity to process presses that come in that tick. If the press comes in after the I think this should be pretty easy to fix properly, I'll do a PR. 👍 |
Indeed, moving some of the |
The fault is not your side, it's an engine bug. There is PR to fix it, it just needs to be reviewed and merged. There's no point making a PR for warnings, as it is just as simple to fix it. In some cases putting input code in the |
Then what's the point of using `_process` at all? Isn't everything better off being inside of a `_physics_process`?
…On Thu, Oct 19, 2023, 09:51 lawnjelly ***@***.***> wrote:
Indeed, moving some of the Input code into the _process function fixed
this issue for me. Thx ❤️
It really needs to be more clear what is going wrong. Something like debug
warnings, idk.
The fault is not your side, it's an engine bug. There is PR to fix it, it
just needs to be reviewed and merged. There's no point making a PR for
warnings, as it is just as simple to fix it.
In some cases putting input code in the _process() can be used to mostly
workaround it in the meantime (although even that appears to be
susceptible, to a lesser extent).
—
Reply to this email directly, view it on GitHub
<#66318 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOWMWNDMO57ZTMJM5MTAFZ3YADEXPAVCNFSM6AAAAAAQUJBIGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZQGE3TCNBUGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This comment was marked as outdated.
This comment was marked as outdated.
Notably fixes issues with `is_action_just_*` queries in `_physics_process` for TouchScreenButton. Fixes godotengine#66318. Fixes godotengine#82396. (cherry picked from commit 5137497)
Notably fixes issues with `is_action_just_*` queries in `_physics_process` for TouchScreenButton. Fixes godotengine#66318. Fixes godotengine#82396.
Godot version
4.0.beta1
System information
Vulkan Android
Issue description
on Android with TouchScreenButton node, input_action_just_pressed and Input.action_just_released doesnt work in _physics_process function but it does work with _process function however.
This works on godot 3.5 so im guessing its a bug on godot 4 beta 1
Steps to reproduce
heres an example project with the details:
https://github.com/ShadowwDev/Godot4Beta1-InputBugTest
Minimal reproduction project
Project download
InputBugAndroid.zip
The text was updated successfully, but these errors were encountered: