Kinetic scrolling screenshot 1
V

Publisher

vitazheltyakov

Kinetic scrolling

Tools
Scrolling Kinetic Swipe Mobile PC Input Container UI

This script extends the ScrollContainer - adds kinetic scrolling and swipe support. It works on PC and mobile devices. The ability to correctly work with objects inside the ScrollContainer is saved. Kinetic scrolling works correctly when using the mouse wheel. The script is very easy to use - just connect it to the ScrollContainer. To work correctly with objects inside the ScrollContainer, you need to check the status of the scroll (variable "swiping"). Watch the demo.

Godot Kinetic scrolling

This script extends the Godot ScrollContainer - adds kinetic scrolling and swipe support. It works on PC and mobile devices. The ability to correctly work with objects inside the ScrollContainer is saved. Kinetic scrolling works correctly when using the mouse wheel.

How to use?

Just connect ScrollContainer.gd to the ScrollContainer. To work correctly with objects inside the ScrollContainer, you need to check the status of the scroll (variable "swiping"). Watch the demo.

Kinetic scroll uses the _input function. Therefore, in some cases, it is desirable to disable it. You can disable kinetic scrolling using the function setKineticScrollEnable

The following settings are available:

  • Kinetic Scroll Enable - variable allows you to disable the kinetic scroll;
  • Scroll Direction - variable determines the direction of the scroll;
  • Kinetic Scroll Time - variable specifies how long it will continue scrolling;
  • Kinetic Scroll Bias - variable determines the kinetic scroll length;
  • Swipe Tolerance - variable determines which offset to consider as a swipe.

Language: GDScript

Screenshots

Screenshot

License

This script are distributed under the terms of the MIT license.