Dragging the Screen with Mouse and Touch

  • 65 favourites



12,850 visits, 32,902 views



This tutorial hasn't been translated.


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.

Dragging the Screen - Touch

Touch dragging works almost the same as with a mouse with one major difference. You need to repeat the above steps but replace all the Mouse.Absolute with Touch.Absolute and rather than Left mouse click events you will need Touch, Is In Touch events so you have:

but this will not work as you need to make one change. You need to set the DragMouseX and Y variables once Touch starts and not all the time Touch is in use. So, add an event On Any Touch Start and move the DragMouseX and Y actions to it so you have:

This should now work, you can touch the screen and drag the level around.

Finally. if there is anything you need to click on and NOT drag the screen while you do so, you can just add another condition to the Is In Touch or On Left Button Clicked events to give you the following:

For Mouse:

For Touch:

I hope this helps you as much as it did me.


  • Order by
Want to leave a comment? Login or Register an account!
  • Is there a modification to the expression that can take layoutScale into account? If the scale is anything other than 1 this system breaks. I've been trying to figure this out to no avail. Your tutorial is great BTW! Cheers!

  • Thank you very much!

  • Thanks heaps! worked a treat