Does anyone know a way of detecting a swipe gesture?
I have 4 object, I want the user to be able to swipe left and right to select one,
Its gotta be something to do with touch down, velocity? Can we determine the velocity of the touch/mouse object?
Never used the touch object, but I think you can emulate that by keeping trace of the mouse position, comparing values from one tick to another and then if the velocity is high enough during a certain amount of time, you have successfully swept (:
Well touch and mouse are practically the same, So i'll give this ago thanks!!
Develop games in your browser. Powerful, performant & highly capable.
I have been googling around for a bit and am trying to determine how to do a simple swipe event across an html element such as a div, to cause some action to happen in javascript.
Really? why, are you planning on developing a plugin?
If your looking for mobile html elements to en corporate through javascript take a look at iscroll, or jquery mobile.
DiggyDog I'm actually in the end phase of developing an adaptation of iScroll, but encountered a bug when the device orientation is horizontal.
When I'll solve it, I can release it.
septeven,
Cant Wait!!!! Dow you have a rough estimate of completion time? :) Is there anything I can do to help?
it's coming ;)
Hi Septeven,
Have you got the mobile swipe gestures working yet?
2Bdigital I will be working on a carousel part for my plugin, that finally behaves with swipe gesture.
Have you successfully got the swipe gesture working?
Is there anyway I could have a look or can you explain how you achieved this?
I'm working on some touch baseed games but I cant figure out how to get the swipe motion working (horizontal) and as far as I am aware the iScroll code has now been suspended...
2Bdigital
will be working
Btw, I guess it's not difficult to do it in a plugin, and I guess it's less difficult to do it in construct 2 as well.
Mind sharing?