(SOLVED)Problem with 2 collision object?

2 collision

as you can see from the image above, I have 3 object collisions. I want it to only collision with the bottom one. so it will ignore the second square on the top.

so I compare their X and Y and change the value of the square, but it does not work.
how can I only change the value of the bottom square that is a collision with the glass?

Hi, the easiest way in this case would be just to decrease the actual collision mask of your sprite. You could make it as small as the bottom of your glass.

thanks for the answer, but I already know that and decide not to change the collision object. I need the full collision for the next logic. is there any other way?

If it’s just one object, you might want to use an instance variable to store the ID of the square that’s colliding with the grey object

You could also use “Point inside object” which you can find under collision. It tests exactly what it says, namely whether a specific point (for example on your glass bottom) is inside glassPos.

1 Like

actually, I already solved it to make another object that is smaller enough inside the grey square, but your suggestion may be a better choice to simplify the event.
I will try to apply it, thanks again.