Hi,
Is it possible to set an app to only respond to single touch?
Thanks,
Chris
Hi,
Is it possible to set an app to only respond to single touch?
Thanks,
Chris
Single touch? Like a tap?
See if this helps: http://docs.coronalabs.com/api/type/EventListener/addEventListener.html
Ah, I mean so that the whole app only responds to one touch instead of multiple touched. But I guess the best way of doing it will be to check the number of touches within each touch even function.
Thanks
You’ve lost me I’m afraid. I’m not quite sure what you are trying to do
Default behaviour is 1 touch at a time. You have to enable multi touch specifically. Something else might be going on?
If you have touch objects overlapping you need to use “return true” at the end of a function so that a touch does not go through to the second or further objects. Also Tap and Touch events work separately so even if you return true both will go through if the objects are overlapping.
If you mean the touch is being ran too many times, are you using an event.phase == “ended” or event.phase == “began” ?
Ah great, that’s what I meant. Thanks.
Single touch? Like a tap?
See if this helps: http://docs.coronalabs.com/api/type/EventListener/addEventListener.html
Ah, I mean so that the whole app only responds to one touch instead of multiple touched. But I guess the best way of doing it will be to check the number of touches within each touch even function.
Thanks
You’ve lost me I’m afraid. I’m not quite sure what you are trying to do
Default behaviour is 1 touch at a time. You have to enable multi touch specifically. Something else might be going on?
If you have touch objects overlapping you need to use “return true” at the end of a function so that a touch does not go through to the second or further objects. Also Tap and Touch events work separately so even if you return true both will go through if the objects are overlapping.
If you mean the touch is being ran too many times, are you using an event.phase == “ended” or event.phase == “began” ?
Ah great, that’s what I meant. Thanks.