Is there anyway of disabling the mouse press event for a collider?
I have two colliders, the first is catching mouse press, the other is used for something completely different. However, the first one is bigger than the second, so OnMouseDown() is never triggered in the smaller of the colliders, because the other one is on top. I know I can fix this by putting the mouse press collider on top in the z-axis, but it would be nicer to just disable mouse events for the first one.
Thanks that worked. However, is it possible to tell unity to ignore raycast for a custom layer? I played around with the new layer matrix in unity 3, but couldn’t make this work.
OK, but if I understand correctly, then I would have to implement the whole mouse click thing myself without using the build in feature that captures mouse clicks in OnMouseDown() ?
I’ll add that unlike the culling mask, it seems that the eventMask can’t be set directly from the Camera editor, so i had to make it accessible via script.