Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Double Tap — Gideros Forum

Double Tap

OZAppsOZApps Guru
edited March 2014 in General questions
This one nearly killed me.

I was trying to set up a Double Tap or multi-touch and detecting the number of fingers touching the screen. Well this worked fine, I could get it to work. Then what I was after was to detect if a particular sprite on screen was mutli-touched. Which could mean that there could be a touch on each of the sprites and that will register as 2 touches. So I had to set up some internal flags on the number of touches on each of the sprite, however when the touches begin in a particular sprite but end in another one, we do not have a way to identify the same as it would be absolutely unclear as to which touch moved into another sprite and which one ended. So, while I had it working I had to remove that functionality for that one off case where it failed. I did not want to handle setting a touched control that receives all of the events after the first touch. It would be best if it was handled from the internals of Gideros than Lua code.

@Atilim, can you add the Event.TAP and maybe some Gesture events rather than having to write lines of code everytime?

The reason why Event.TOUCHES_BEGIN would not work is that if this event handler was attached to say 5 sprites, then irrespective of which sprite was tapped, all 5 are triggered, then we have to get the touch co-ordinates, get the touch target, do a hitpoint test to determine if the touch was inside of the target or not.

I feel that rather than handling this via code by the user, this should be handled internally by Gideros as this can save unnecessary amounts of redundant code being written and managed by the users.

Do you think this can be incorporated would be easier and faster and saves additional lines of code to handle stuff.

Likes: hgvyas123

twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
+1 -1 (+1 / -0 )Share on Facebook

Comments

Sign In or Register to comment.