On collision not working

Hello Community,

I’m making a food type clicker game… click on the icon ‘Tomato’ and it will create object: Tomato over a sprite = round pizza base.

This works but because the create object has x & y coordinates, it create it in a square… so there are tomatoes offset (in corner) the pizza base (make sense?)

I have another sprite…a rectangle (hidden)… the idea is if a stray tomato collides with it… it should delete. - but it’s not working. If tried LAYERS also :frowning:

What am I missing?


Your collision is a subevent. It will only ever fire if all parent events are true.

If you pull that event out of being a subevent, does it work?

Sadly no :frowning:

i tried a few things

Hmmm…I would need to see the events after that change is made and not working, because I can’t reproduce the problem in a test project.


You can try another approach:

Note: Creating positions doesn’t matter since the position is then changed.

This way you don’t need to check for collisions and delete, the tomato will always be created inside the pizza.

1 Like

That works - Thanks @insein
and thanks @Silver-Streak