News: Enjoy our Christmas offer 30% off on our latest package Tower Defense Level Kit

  • January 20, 2019, 05:50:06 PM

Login with username, password and session length

Author Topic: Separating event types / locking on a single event type (until completion)  (Read 613 times)

Offline scornflake

  • Newbie
  • *
  • Posts: 1
I'm using EasyTouch event handlers, i.e:

Code: [Select]
            EasyTouch.On_Swipe2Fingers += EasyTouchOnOnSwipe2Fingers;
            EasyTouch.On_Pinch += EasyTouchOnOnPinch;
            EasyTouch.On_TouchUp += EasyTouchOnOnTouchUp;

However I see multiple types of events. If I pinch, I also see a few swipe events. If I don't release my fingers and then swipe, I receive primarily swipe events (but sometimes pinch, occasionally, especially when the fingers stop moving on the device). Is there a simple way to have EasyTouch detect the primary motion, and only send those events until the number of touches changes?  Or is this something I have to code myself?

p.s.: Using a method similar to what is in RTS_NewSyntaxe, I see similar results.

Here's an example, using Unity Remote. All I did was gently swipe left and right a number of times, with two fingers.
        void Update()
            Gesture current = EasyTouch.current;
            if (current == null)

            Debug.Log("Type: " + current.type);

Pic of settings (couldn't get attachments to work here)
« Last Edit: May 10, 2017, 08:14:50 AM by scornflake »

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792

EasyTouch always send all event for each finger. If you have to manage single gesture and multi fingure gesture, you just have to test the parameter touchcount