Simple swipe on object

3

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

7,720 visits, 12,749 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.

Published on 28 Jun, 2014. Last updated 19 Feb, 2019

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.