I'm detecting the mouse clicks if the click is happened over the collider but i dont't want to fire mouse click if it is on the trigger object. How to i do this. Anyone give me a suggestion.
Thank you!
I'm detecting the mouse clicks if the click is happened over the collider but i dont't want to fire mouse click if it is on the trigger object. How to i do this. Anyone give me a suggestion. Thank you! |
|||||||||||||||||||||
|
How to detect clicks on object? . This is a question I had asked. The proper way to detect mouse clicks is to use RayCasting, RayCast2D for 2D. While Raycasting, you can specify layermask, which let's you ignore objects which you want to ignore. The second answer on the aforementioned question provides a solution for 2D. |
|||||||||
|