- Home /
how to trigger a OnMouseDown, while another Collider2D blocks the way,OnMouseDown when several colliders overlap
So I want to trigger a OnMouseDown function, while there is another collider in front of the collider I want to access (all box2DColliders). And to make it even more complicated, there is a third one in the back I want to ignore. The middle collider isn't always on the same object with the same script. Or else I would just do a distance check, get the script, and be done with it. Any thoughts how to trigger the OnMouseDown function. (I'm not able to put the collider on top, because I'm using the OnMouseDrag on that collider/object).
Your answer
Follow this Question
Related Questions
How to calculate a Collider2D's bounds 0 Answers
Altering Collision Based on Proximity 1 Answer
Unity2D collider of children object always hits in the same direction even after being flipped. 0 Answers
Collider2D and Translate problem 1 Answer
How do you get OnTriggerEnter2D to activate only once? 3 Answers