Drag and Scroll the Screen using Touch Control

9

Attached Files

The following files have been attached to this tutorial:

.capx

touchscroll.capx

Download now 609.9 KB

Stats

5,145 visits, 6,883 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 10 Oct, 2017. Last updated 19 Feb, 2019

Hi Everyone!

I was looking for a way to drag the screen like we all know it from so many mobile apps and here is one method you can do it.

My goals were:

1. Acceleration according to the input

2. The movement has to stop when the finger stops

3. The movement smoothly decelerates after swiping

4. Change of direction anytime possible

5. Scroll on the edges of the viewport while dragging something

I have found a way to make this very easy and uncomplicatet, just understandable for everyone. I did not testet it in a real game yet, but i can not see a reason why this schould not work. Please give me your feedback and correct me if i am mistaken.

Edit: New .capx where the collision of the Camera Object is disabled.

Greetings from Germany!

PS: You can keep all spelling and grammatical errors ;)

.CAPX

touchscroll.capx

Download now 609.9 KB
  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • This is exactly what I was looking for and trying to do for the longest time. Thank you very much for the awesome tutorial!!!