Questions on Swiping
![MADGames](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi GameSalad Community,
I'm working on a project that includes heavy use of swiping. Right now I'm just trying to implement it properly, and I have a few questions after I watched the tutorial on swiping on YouTube. (The tutorial in question is this one:
)
Through creating attributes touch (real), release (real) and swipeDirection (int), I configured my project to be able to detect mouse position X and display "left swipe" or "right swipe" accordingly from creating a less than greater than rule. I then made the code display a text "LEFT SWIPE" or "RIGHT SWIPE" respectively.
However, I noticed that with this configuration I did not have to technically "swipe", but I could just tap a location and tap another location along the X axis and it would register as a "swipe". If I tapped a location, and tapped another location to the right, it would register as a left swipe, and vice versa. Is there any way to combat this issue?
Also, is it possible to set a minimum length that must be swiped before attributes are changed?
Lastly, what behaviors would allow me to be able to be able to "record" and display their swiping while the application is running? This is similar to how Fruit Ninja works, with how swiping is displayed with the blade.
Thanks,
Marcus (MADGames)
I'm working on a project that includes heavy use of swiping. Right now I'm just trying to implement it properly, and I have a few questions after I watched the tutorial on swiping on YouTube. (The tutorial in question is this one:
![](https://img.youtube.com/vi/mvGcnPJhtCU/0.jpg)
Through creating attributes touch (real), release (real) and swipeDirection (int), I configured my project to be able to detect mouse position X and display "left swipe" or "right swipe" accordingly from creating a less than greater than rule. I then made the code display a text "LEFT SWIPE" or "RIGHT SWIPE" respectively.
However, I noticed that with this configuration I did not have to technically "swipe", but I could just tap a location and tap another location along the X axis and it would register as a "swipe". If I tapped a location, and tapped another location to the right, it would register as a left swipe, and vice versa. Is there any way to combat this issue?
Also, is it possible to set a minimum length that must be swiped before attributes are changed?
Lastly, what behaviors would allow me to be able to be able to "record" and display their swiping while the application is running? This is similar to how Fruit Ninja works, with how swiping is displayed with the blade.
Thanks,
Marcus (MADGames)
Comments
@pan_joshua: The video is all well and good, but a lot of the code is focussing on the camera's reaction to the swipe. I'd like to understand what tshirtbooth does in the Expression editor in which he does not have time to explain in the video, that would help me a lot.
Thanks for your input