GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Swipe Distance and Speed

Hi guys,

I'm a newbie here doing some research on GS and hoping to gleam some knowledge from existing GS users.

Is it possible to measure the physical distance of a swipe (millimetres or pixel) and perhaps even the speed of a swipe (miles per hour).

I'm not asking how to achieve this. I just want to know if it's possible.

Thanks all.

Sam.

Comments

  • JSprojectJSproject Posts: 730Member

    Have a look at "The Swipe Factory" by Armelline, http://www.armelline.com/snippets.html

  • Soopa ArrowSoopa Arrow Posts: 7Member, PRO

    Interesting question. I believe you might be able to. Maybe my logic is incorrect but I am assuming you could start a timer per touch and release so when a touch is detected, the timer starts, when released, the timer stops. Then you could use the points X and Y of the touch to determine the distance from start to stop. The time from start start co-ordinates to the end co-ordinates can determine the speed. I think it can work, never tried it, just a suggestion. Hope it makes sense too.

  • SamHamiltonSamHamilton Posts: 2Member

    Thanks for the super fast responses. The swipe factory looks like a great starting point.

    Thanks for pointing me in the right direction :smile:

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member

    GSHelper has a few videos on swipe and speed stuff.

Sign In or Register to comment.