[Help]Is There A Way to Get OnMouseDown to ignore certain objects

Let’s say I want to create an exploding object to defeat my enemies in Glitch Garden. Is there a way to ignore the Collider of the enemies when using OnMouseDown? I’d rather not have to completely rewrite it to use Raycasting if I can avoid it.

I think that you can use layers, just create a layer for it and for the other objects, and then disable the collision between the explosion and the objects that you dont want it to collide under physics2d settings (if you are using 2d objects), don’t know if this is what you are looking though

1 Like