In my project I have some geometry that often occludes 3D widget. 3D widgets are drawn with disabled depth testing, so they are always visible. Both geometry and the widget are clickable, however if the user clicks on a widget, I want it take priority over clicking on geometry even if the widget is behind it.
This is an example where I want to click the circled icon which is actually inside the geometry, however the wall blocks the hit test:
Is there an easy way to achieve something like this?
I don’t want to have disable geometry collision, because there could be more than one thing occluding the widget, and figuring that out might turn into a nightmare (+I still want to keep geometry itself clickable if mouse is not over the widget).
I am hoping there is some solution like setting different priorities to different object channels or something like that.