Discriminating Touchs

Basically i want to discriminate between the Touchs on the Screen elements and the Touchs on everything else.

I’m thinking on putting the events on the canvas element. So no matter where you touch i get the event. Then i put events in each UI element, if those trigger, i tell the canvas event to “not do the thing”.

I want to rotate a camera by swiping but i dont want it to rotate if a UI element is being dragged.

But maybe there is a better way, i need advise. Thanks in advance.

1 Like

Ok, i dont know if someone cares. But i had another idea. Why not use ALL the events in the UI. the Screen elements already dont overlap the events.

So i m gonna use a empty group that occupies the whole screen and is behind the rest of the UI. If he gets the touch, nothing in the UI was selected.

1 Like