-
-
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
Fix InputEventScreenDrag on Android #84331
Fix InputEventScreenDrag on Android #84331
Conversation
d4ccde9
to
e3c9f57
Compare
e3c9f57
to
461d38a
Compare
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.
The logic looks good.
Can you add comments to the added code to clarify what it does.
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.
I'm seeing some scrolling artifacts when testing these changes using the Android editor; can you address them.
Screen_Recording_20240213_154028_Godot.Editor.4.debug.mp4
I'll try to find time for it again in 2 or 3 days. |
93dad9d
to
3397b30
Compare
@m4gr3d The new solution should be better, easier to understand and probably also perform better. I tried out various gestures with Godot Editor and checked them in Logcat. Checking 'pointerCount' is not necessary as it was in my old version. |
@Alex2782 Did you intend to close this? Or did you delete the branch by mistake while cleaning up? |
Sorry, my mistake, I didn't think it would be deleted here too. Can it be reopened or should I create a new PR? @AThousandShips / @akien-mga |
@Alex2782: IIRC a deleted branch can't be reopened, but check your Git GUI, it might have some undo options... |
@Alex2782 Your commit still had a few issues that I addressed in db6f1c9e2f36721d7a7f7fac17f4baebdb31615d. Can you take a look and merge the commit together if the updates look good. |
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.
Approved with the updates included in db6f1c9e2f36721d7a7f7fac17f4baebdb31615d.
The commits will need to be squashed together prior to merging.
platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt
Outdated
Show resolved
Hide resolved
Thanks! |
Fixes: #84138
Fixes: #84182
I haven't checked the effects on other events yet.
Event
onScroll
is not fired directly and is not so good for 'ScreenDrag':androidx.core sources
Tests
test-project.zip
v4.2.beta2.official [f8818f8]
The "Drag At" and "Motion At" values are higher (the fingers have to be moved more)
beta2-Screen_recording_20231101_233924.mp4
this PR:
PR_Screen_recording_20231101_231239.mp4