0
\$\begingroup\$

In my 2d game project I have an object A moving above map. Both object and map have colliders (circle collider and polygon collider respectively), as well as actions to be performed on OnMouseUpAsButton. Objects are displayer properly in the game, however, when I click on the object it usually detects map (usually as in sometimes it detects the object if I press in the very centre of the object). How to ensure that my objects of type A are always checked first for MouceUp?

\$\endgroup\$
0
\$\begingroup\$

Well I found an answer that seems to work- even though it is a 2d project set Z transform position of the object to -1. It's a hack but it works

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.