-4

I am currently working on a project and trying to get swipe gesture working. Current output is several instances of swipe gestures from just a swipe. How can i get one instance?

Thanks

maZZZu
  • 3,585
  • 2
  • 17
  • 21
Elololex
  • 41
  • 5
  • 3
    What is your exact problem, what have you tried? – BendEg Nov 10 '14 at 16:35
  • Gestures in the Leap Motion API are tied to individual fingers. So you will typically get multiple swipes from the same hand motion. You can ignore all but one. – Charles Ward Nov 11 '14 at 04:51

2 Answers2

1
if (Input.touchCount > 0)
{
    Input.GetTouch(0).phase == TouchPhase.Moved)
    {
        // One swipe gesture
    }
}
marsh
  • 2,592
  • 5
  • 29
  • 53
0

You can setup a Boolean variable to change state if a good swipe was performed and if it set to true, swipe recognition will be disable lets say 2 seconds or until some actions get completed.

Chop Labalagun
  • 592
  • 1
  • 6
  • 19