I have an object with 2 children : Radius and MouseDetect. They are both sphere colliders. MouseDetect is smaller than radius, and I need to detect whether the mouse is over MouseDetect. OnMouseOver doesn't work in that case (only the outer sphere collider triggers even though both spheres are Triggers).
I tried raycasting with a layer mask on the outer sphere, but it masks the whole object.
Any advice would be greatly appreciated.
Setting the two colliders to different layers should let you pick the correct one with ray casting. You can also do it with tagging and physics raycast all but the layers option is faster. (You have to write your own mouse over code in both cases)
answered May 23 '10 at 10:11 PM