what's the best way to determine my touch is slow move movement or fast swipe ?

what’s the best way to determine my touch is slow movement or fast swipe ?

thanks a lot. [import]uid: 21680 topic_id: 12000 reply_id: 312000[/import]

Our Samurai Fruit demo does just that; check it out for example code :slight_smile:

http://developer.anscamobile.com/code/samurai-fruit [import]uid: 52491 topic_id: 12000 reply_id: 43770[/import]

Hi Peach! I downloaded the code, and I only see it calculating the distance between start and finish of the swipe, not how fast it was.

Maybe I misunderstood the question. [import]uid: 58455 topic_id: 12000 reply_id: 43971[/import]

It wont tell you how fast it was, but it will only play a sound on a fast swipe. Try swiping slowly and it wont do it - so it’s seeing the difference - you may just need to play with it a little to get it sensitive (or not) enough for your needs.

Make sense?

Peach :slight_smile: [import]uid: 52491 topic_id: 12000 reply_id: 44004[/import]

It only plays the sound if the slash is longer than 50 pixels. I thought the OP wanted to catch the length of time a swipe takes, which I think would be pretty straightforward with event.time captured during the “began” and “ended” phases of a touch event. [import]uid: 58455 topic_id: 12000 reply_id: 44025[/import]

any one has the Samurai fruit sample code ??

[import]uid: 13061 topic_id: 12000 reply_id: 86455[/import]

I’m also interested in Samurai fruit sample code. I tried both here and on github, but code is removed because drm violation. (fruit ninja). If somebody has samurai code, it can be posted without images, only .lua files. Thank you. [import]uid: 165823 topic_id: 12000 reply_id: 117700[/import]

Anyone? [import]uid: 165823 topic_id: 12000 reply_id: 117771[/import]

You may want to try directly reaching out to someone in the community rather than asking on the forum; no one will post code after DRM stuff. [import]uid: 52491 topic_id: 12000 reply_id: 117850[/import]