-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Clean-up and refactor of the Android input implementation #65434
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really clean overall, love it!
platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt
Show resolved
Hide resolved
This should be backed up by a proposal, because it directly conflicts with the approach suggested in godotengine/godot-proposals#4340. |
f07a40a
to
696bb6d
Compare
Fix the bug causing the editor to crash when running the project.
696bb6d
to
c3c0bea
Compare
Thanks! |
I'm new to github, how can I use this? |
You could compile the Android editor from source, but it's not trivial and not well-documented right now. If you don't feel like compiling from source, wait for 3.6beta1 to be released. |
This is really interesting! Has it made it into 4-beta10? I can't seem to produce any of those gesture with my Android builds. |
@ygingras The logic to enable the gestures is not yet exposed to gdscript in order to allow the functionality to stabilize (since it was a fairly large rewrite to the Android input logic). At the moment enabling them requires rebuilding the engine (see here for reference). Once the logic is stabilized, we'll make it configurable through gdscript. |
Got it! Is there an issue or another source of info that I can follow to know when this is ready for consumption in GDScript? I might try the engine rebuild if this is scheduled passed 4.1, but otherwise, I will probably wait patiently. |
@ygingras The following project settings were added in Godot 4.2 beta to enable gestures on Android: |
Great! I can't wait to give those a try. |
The first commit cleans up and refactors the Android input implementation:
GodotInputHandler.java
class which is now responsible for setting up and configuring the gesture handler logicprocess_touch_event
for touch,process_mouse_event
for mouse & stylus, andprocess_magnify
andprocess_pan
for scaling and panning gestures.In the process, the PR addresses several existing Android input bugs:
Fixes #8151, fixes #46100, fixes #46101
Supersedes #59760, #54225
The second commit enables the long press, multi-finger panning and scaling gestures for the Godot Android Editor and fixes an input related bug that uses to cause a crash when clicking on the
play
button from the editor window.Addresses some of the issues reported in godotengine/godot-proposals#3931
godot_android_editor_multi_touch_pixel5.mp4
3.x version