Better swipe control
jay2dx
Member Posts: 611
Hi guys today I've been trying to workout a better more instant way to do swipe control, I started with the usual swipe tutorial you can find on YouTube, touch x and release x method, I've never coded any swipe movement stuff before, this is working well but you have to be very precise with your swipe movements! So sometimes it doesn't detect the swipe.
So my question is what is a better way that let's you swipe more loosely for up down left and right! And is quicker?
Any help or discussion on this would be great
Comments
I am also trying to tackle the "quicker" question. I did take the original swipe method you describe and added an attribute that calculates the absolute value of the slope of the swipe. This way any slope between 0 and 0.5 can be left or right. Any slope between 0.5 and infinity (any big number) can be up or down. This limits my actors movements to strict up/down or left/right motion.
I offer a great swipe template that gives a lot of freedom for left/right swiping, intended for platformers. Check my sig for a demonstration. Adding up/down becomes a little more complex (where does right end and down begin, for example), but shouldn't be all that hard to adapt.
You can get a vague idea of how it works by trying this game I threw together quickly for one of the sweepstakes:
http://arcade.gamesalad.com/games/126446 (You can't swipe and tap at the same time with a cursor, so I'd recommend moving with 'swipes' and jumping with the up arrow. It's essentially Joust.)
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support