Is there a way to enable / disable .touch events like you can with buttons?
I would like to do something like object:setEnabled(false) to turn touch events off temporarily!
Thanks,
Gullie
Is there a way to enable / disable .touch events like you can with buttons?
I would like to do something like object:setEnabled(false) to turn touch events off temporarily!
Thanks,
Gullie
Hi @gullie667,
You could remove the touch event listener(s), but an easier way is to probably just set a boolean property on the object(s) like .canTouch, and then in the touch listener function, just do a conditional check on that and if it’s false, return and effectively nullify the event.
Take care,
Brent
Good enough. Thanks for the help.
Hi @gullie667,
You could remove the touch event listener(s), but an easier way is to probably just set a boolean property on the object(s) like .canTouch, and then in the touch listener function, just do a conditional check on that and if it’s false, return and effectively nullify the event.
Take care,
Brent
Good enough. Thanks for the help.