godot: TouchScreenButton with is_action_just_pressed() bug
Godot version
4.1.2.rc1
System information
Godot v4.1.2.rc1 - Windows 10.0.19045 - Vulkan (Mobile) - integrated AMD Radeon™ Vega 8 Graphics () - AMD Ryzen 3 2200G with Radeon Vega Graphics (4 Threads)
Issue description
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
this form with “just” don’t work on mobile (android) i don’t know why but when you try it in pc with mouse emulate touch it works fine but when you export the project to the mobile it don’t work although is_action_pressed() works fine idk why the one with “just” don’t work with TouchScreenButton on mobile please fix that
Steps to reproduce
if Input.is_action_just_pressed("ui_accept") and is_on_floor(): velocity.y = JUMP_VELOCITY
its a basic form of jump when you add TouchScreenButton and assign it with ui_accept and try it it only works in pc not actually on the mobile i cant just the Button dont work things to note : -TouchScreenButton work with is_action_pressed() on mobile but is_action_just_pressed() don’t work -is_action_just_pressed() work fine in pc when you click with the mouse but it don’t work on mobile -It only work on mobile if you make a signals for pressed and released for TouchScreenButton
Minimal reproduction project
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 18 (8 by maintainers)
Commits related to this issue
- Fix Android logic for deferred window input events being inverted Notably fixes issues with `is_action_just_*` queries in `_physics_process` for TouchScreenButton. Fixes #66318. Fixes #82396. — committed to Alex2782/godot by Alex2782 9 months ago
- Fix Android logic for deferred window input events being inverted Notably fixes issues with `is_action_just_*` queries in `_physics_process` for TouchScreenButton. Fixes #66318. Fixes #82396. (cher... — committed to YuriSizov/godot by Alex2782 9 months ago
- Squashed commit of the following: commit a9d964d6aafb32013de0e76939fdf7aeff7a15fa Author: warriormaster12 <streng.alexander@outlook.com> Date: Mon Oct 25 21:05:50 2023 +0300 Fix node property ... — committed to warriormaster12/godot by warriormaster12 8 months ago
- Fix node property duplication Squashed commit of the following: commit a9d964d6aafb32013de0e76939fdf7aeff7a15fa Author: warriormaster12 <streng.alexander@outlook.com> Date: Mon Oct 25 21:05:50 202... — committed to warriormaster12/godot by warriormaster12 9 months ago
- Fix Android logic for deferred window input events being inverted Notably fixes issues with `is_action_just_*` queries in `_physics_process` for TouchScreenButton. Fixes #66318. Fixes #82396. — committed to orianbsilva/godot by Alex2782 9 months ago
I’m experiencing the same issue.
Here’s my minimal project: TouchScreenButtonBugMobile.zip
@Alex2782 @ErezShahaf
Thank you for fixing this issue @Alex2782
I think it’s not a duplicate it’s just similar in things doesn’t work on mobile properly , i hope this will be fixed and thanks for the response
Best regards RoboLamp Dev
On Wed, 27 Sept 2023, 12:00 am Markus Sauermann, @.***> wrote: