godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.15k stars 21.19k forks source link

Scrolling glitch when using GraphEdit on mobile #36312

Closed noidexe closed 2 years ago

noidexe commented 4 years ago

Godot version: 3.2

OS/device including version: Description: Manjaro Linux Release: 18.1.5 Codename: Juhraya Kernel: Linux 5.4.15-2-MANJARO Architecture: x86-64

Mobile targets: Moto XT1572 Moto g(7) power

Issue description: GraphEdit nodes scroll uncontrollably and randomly when dragging scrollbars or simple when selecting multiple GraphNodes with touch and drag. I though it was triggered by a PanGesture being detected but it's not always the case. Here's a video. Sorry I forgot to enable tap display. I'm touching the background and sometimes it triggers a multiple selection and sometimes it makes the scrolling jump around like crazy. Same thing while dragging a GraphNode. Also when dragging a scrollbar. The signal for user scrolling is emitting when the glitch occurs as you can see on the console

https://photos.app.goo.gl/CVeh18JfgECNzyce9

Steps to reproduce:

Minimal reproduction project: issue36312.tar.gz

noidexe commented 4 years ago

Commenting the following code seems to fix the bug: https://github.com/godotengine/godot/blob/6e6403669377160885cac45db7b8115325c3932f/scene/gui/graph_edit.cpp#L1073-L1078

PanGesture on android seems to be detected by a 1 finger touch and drag so it's probably conflicting with other input code. I don't know if there is any use for detecting the gesture unless it's done with more than one finger on some platform.

Also, pinch and zoom doesn't seem to trigger MagnifyGesture, at least not on Android so I'm not sure if the following lines are doing anything: https://github.com/godotengine/godot/blob/6e6403669377160885cac45db7b8115325c3932f/scene/gui/graph_edit.cpp#L1067-L1071

Calinou commented 4 years ago

@noidexe Gestures are currently only implemented on macOS, see #13139.

akien-mga commented 4 years ago

Actually PanGesture was implemented in #33630. There was then a fixup to that PR which will be in 3.2.1: #35701, but it's for the double-tap part, so likely not involved here.

KoBeWi commented 3 years ago

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?

noidexe commented 3 years ago

Confirmed on 3.2.3. Exactly the same behavior.