Swipe without pressing buttons/links

Get help using Construct 2

Post » Sat Sep 22, 2012 2:53 pm

I want to build a menu system which is scrolled through on touch devices by swiping. However I need a way to check if a player has tapped a link or if they just pressed on the link/button/image as a starting point of their swipe. I've been thinking on this for a couple days now but just cannot think of a solution.
Has anyone got any suggestions?

Cheers
B
18
S
5
G
2
Posts: 19
Reputation: 3,965

Post » Sat Sep 22, 2012 5:22 pm

Start a timer on touch start. Then on touch end if the timer is less than 0.2 (?) seconds then it's a tap otherwise it's a hold/swipe.

Also you can store the x,y values on touch start and if they're the same on touch end then it's a tap and if they're different it's a swipe. You might want to allow for a little variation.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests