Hello everyone,
I have a runtime touch event called OnScreenTouch ( to do stuff like swipe the screen left and right), and an object1 with its listener created like this
local function OnObjectTouch(event)
// do stuff
print("OnObjectTouch is called")
end
object1:addEventListener("touch",OnObjectTouch)
The problem is after touching the object, although i did't touch that object, i mean i touched out side of it, which is the screen , it always calls the OnObjectTouch listener. I tested it by printing it out as above. How to fix this, when i touch out side of that object i want to swipe the screen, not to do stuff that the onObjectTouch commands. Any suggestion?