Add smooth scrolling to your game or app (very easy!)

7

Attached Files

The following files have been attached to this tutorial:

.c3p

scrolling-tutorial.c3p

Download now 159.21 KB

Stats

2,024 visits, 2,520 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 9 Sep, 2019.

You can create a smooth scrolling effect for your game or app very easily with the built in behavior 8Direction and ScrollTo.

Step 1:

Create a new sprite. You can use an empty sprite or just make it invisible to hide it.

Step 2:

Add the ScrollTo and 8Direction Behavior to the new camera sprite.

Step 3:

Edit the 8Direction behavior properties. The image shows some suggested values but you should test and change as necessary.

Step 4:

Use the code from the example project to add the scrolling behavior.

Below is the code for the scrolling but there are a few more lines to limit the scrollable area and to stop when the user touches the screen.

.C3P

scrolling-tutorial.c3p

Download now 159.21 KB
  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!