input: Ignore InputEventScreenTouch #2331
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On android, Godot triggers an
InputEventMouseButton
in addition to anInputEventScreenTouch
andInput.is_action_just_pressed(<mouse action>)
already returns true during the touch event. I don't have an ios device to test it, but I assume it would be the same there as well.subsystem_input.gd
currently handles the touch event in_unhandled_input()
which makes the input catcher more or less meaningless on a touch device.This PR will break projects with the setting
input_devices/pointing/emulate_mouse_from_touch
disabled unless they provide a custom input catcher or useTouchScreenButton
s to convert touch into actions. I think thats's an acceptable tradeoff as such a setup also breaks touch input for many other controls like regularButton
s.