Hello everybody… I am new to LUA and Corona, so please forgive me if this is obvious. I have setup a touch event for a group of objects in a table. This works great as long as the user is not sliding their finger very fast. As soon as the user goes too fast event.phase == “ended” fails to fire. My object is then left in limbo as I have not figured out a way to determine that this has occurred If the finger is moving at reasonable speed everything works fine. I have also tried to put in an event.phase == “cancelled”. That does not fire when this occurs. So two questions:
#1… Is this a bug? Would you normally expect an ended to always fire even if the system cannot track the touch anymore?
#2. Regardless of whether it is a bug or not, How do I determine if this happened so I can reset things?
Thanks
Code below:
function freeTileGroupHandler (event) tileNbr = event.target if event.phase == "began" then tileNbr.markX = tileNbr.x tileNbr.markY = tileNbr.y freeTileNbr = tileNbr.myName elseif event.phase == "moved" then tileNbr.x = (event.x - event.xStart) + tileNbr.markX tileNbr.y = (event.y - event.yStart) + tileNbr.markY elseif event.phase == "ended" then -- DO LOTS OF STUFF HERE end return true end -- Table below has many display.groups loaded into it "a" is part of a loop that adds an event listener for each object in the table. The -- event handler above figures out which item was touched with event.target gameData.currentTileSetPlayer1[a].graphics.freeGroup:addEventListener("touch",freeTileGroupHandler)