SpyrexDE / SmoothScroll

Addon for the Godot Game Engine that adds a SmoothScrollContainer.
https://spyrexde.github.io/SmoothScroll/
MIT License
144 stars 13 forks source link

Not using event.relative #42

Closed scgm0 closed 7 months ago

scgm0 commented 8 months ago

When the "input_devices/pointing/emulate_touch_from_mouse" and "input_devices/pointing/emulate_mouse_from_touch" settings are turned on at the same time, using event.relative becomes no longer reliable. Calculate relative by yourself to solve this problem. My English is terrible, so "drag_old_pos" is just a temporary name, and there is no comment to explain what it does.

HaroldLever commented 8 months ago

This issue is mainly due to "emulate_touch_from_mouse". When it is true, Godot sends screen touch event at the same time when mouse event occurs, which is why it gets double relative movement. I think there might be better solution like giving users choices to decide whether accept mouse event only, accept screen touch event only or accept them both.

SpyrexDE commented 7 months ago

Fixed by #44