Touching on collision masks doesnt work

Hello everybody,
How can I make my object work in just touching its collision mask?.
It doesnt work what I tried.
The collision mask below:


I tried two ways:
1: It worked even outside the collision masks

2: doesnt work at all


what should I do?
thank in advance!

Try this method and then add whaever action you want.

1 Like

Are you using actual touch (touch input) or a mouse?

These are different input types and are handled differently. For instance, as far as I remember cursorx/y() only works for mouse cursors or when virtual cursors are enabled for touch. If you are using multitouch you need to track touch ID’s and use the touch expressions.

1 Like

For future reader, just use “button state” extension, it will work inside collision mask.