Simple swipe on object

3
  • 35 favourites

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

6,815 visits, 11,303 views

Tools

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.

Hello all !

Today, I will explain to you how to detect simple swipe events !

You don't need a lot of Global/Local variable and no more events !

Let's begin :)

First step

First, you have to create your unique variable : IsSwiping

After, make your event like this :

Why ?

In construct 2, AngleAt(0) (which return angle with touch id 0) return values of angle like this.

Now, you can make your own directions !

Moreover, "1000" value in the first event mean the speed of the swipe :)

The higher value is, the harder is it to swipe ;)

(Sorry for English, I'm french ^^ Tell me if I'm wrong)

.CAPX
  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Your swipe left and right code is backwards. it needs to be swapped around in your capx.

  • Hello, thanks for the short Tutorial! justifun not really. In terms of finger moving direction, you are right; but it is describing the "swipe direction" like apple's natural swipe. So swiping "left" will go right.