1 Collider and multiple objects

Hi,

I have 1 collider and 4 objects, it’s touching all of them, and one of them is tagged. If player clicks on the one that is tagged it ‘should’ trigger win, and if on the other ones then lose. However this doesn’t seem to work correctly, it just does ‘lose’ all the time even on the one with the right tag. Any ideas how to handle this??

51056-screenshot4pictures.png

Hi @kaplica

First of How are idendtify which object is touched by user. Cos your collder is only cover partial area of each picture or image. so If you are using raycast then it will always detect only one object (which are invisible but has collider), As per image you are using box collder which are touched all four images.

you can use RaycastHit’s point member to identify where your racast hit on collder (i have tried it on mesh collieder, but never tried it on box collider) If its not worked with box collider then you can use a quad form Unity inbuilt 3D object apply mess collider and set 0 matarial count in renderer so it will become invisiblle but still you can access mesh collider via raycast and raycasthit