playMaker

Author Topic: Swipe Gesture Event Variant  (Read 3302 times)

Graham

  • Sr. Member
  • ****
  • Posts: 333
  • I Love Playmaker!
    • Portfolio
Swipe Gesture Event Variant
« on: April 23, 2014, 08:24:42 PM »
Is there an action similar to "Swipe Gesture Event," but instead of only registering a swipe direction once your finger is lifted, it registers it as soon as the finger has traveled a certain distance?

For example in subway surfer, you do not have to lift your swipe finger for the direction event to register.
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

Marsh

  • Full Member
  • ***
  • Posts: 227
  • Comfort the disturbed, disturb the comfortable
Re: Swipe Gesture Event Variant
« Reply #1 on: April 23, 2014, 09:24:27 PM »
Try replacing it with this, never tested

http://pastebin.com/3uQWkwxd

Graham

  • Sr. Member
  • ****
  • Posts: 333
  • I Love Playmaker!
    • Portfolio
Re: Swipe Gesture Event Variant
« Reply #2 on: April 24, 2014, 08:04:34 AM »
Thanks man, works like a charm.
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

Graham

  • Sr. Member
  • ****
  • Posts: 333
  • I Love Playmaker!
    • Portfolio
Re: Swipe Gesture Event Variant
« Reply #3 on: April 24, 2014, 03:29:07 PM »
After doing a little more testing, I've found an issue with this modification. It continues to register new swipes without ever lifting your finger. After detecting a swipe it should be disabled until the finger is lifted and a new swipe is made.

Otherwise works as intended.
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

Marsh

  • Full Member
  • ***
  • Posts: 227
  • Comfort the disturbed, disturb the comfortable
Re: Swipe Gesture Event Variant
« Reply #4 on: April 24, 2014, 07:49:42 PM »

Graham

  • Sr. Member
  • ****
  • Posts: 333
  • I Love Playmaker!
    • Portfolio
Re: Swipe Gesture Event Variant
« Reply #5 on: April 24, 2014, 08:10:10 PM »
Killer! Thanks Marsh.
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!