Inertial Scrolling Too Fast on Mobile Web

Godot Version

Godot v4.4.1.stable.official

Question

Inertial scrolling appears to behave the same on both touchpads and mobile touchscreens. While the high speed feels appropriate on a laptop, it decelerates far too slowly on mobile devices. I’ve only tested this via web export, so I’m unsure how it behaves in native exports. Has anyone addressed this issue with inertial scrolling specifically for mobile on web export?

Here’s a simple demo with a ScrollContainer that uses it’s default settings:

I also tried making my own inertial scrolling using the velocity from InputEventScreenDrag without any particular success. The solution slowed things down, but the behaviour was inconsistent particular during fast swipes.

I don’t know what you mean by inertial scrolling. I loaded your app on my computer and it scrolled really slow with the wheel on my mouse and seemed fine when I grabbed the scrollbar.

I can say that I just worked on camera panning the other day, and my speed constants were all different.

const PAN_SPEED = 40.0 # controller right stick and keyboard arrows
const TOUCH_PAN_SPEED = 1.0 # one finger drag
const EDGE_SCROLL_SPEED = 20.0 # Mouse pointer on edge of screen

My guess is your issue is one size does not fit all.

I’m not entirely sure if “inertial scrolling” is the correct term. What I mean is when scrolling keeps moving on a touchscreen after you lift your finger. It gradually slows down instead of stopping right away. The issue I’m facing is that this scrolling continues for far too long after lifting my finger from the touchscreen.

Ok.

If you want more specific feedback then you should post your code. Please paste it between two sets of three tick marks. ```