Input behind 3d

What I have going on in one particular part of this project is:

  • a 3d model with a couple of world canvases that each have a button
  • an overlay canvas with more general UI which includes a top bar and a floating button

I want to be detect if the user clicked somewhere outside of either the overlay canvas’ elements, and the world canvases. “In the background”, in other words.

How do I do this? Do I have to do this with another world canvas behind the 3d model? What I worry about there is that the user can rotate the camera around the model, so I’d have to reposition that particular canvas whenever the camera moves.

Can I achieve this with a second camera somehow? (And if I have to do so with a world canvas, how do I make sure the world canvas takes up the whole of the camera’s viewport?)

Note, I don’t need to render anything for this background area - I just want to know if there was otherwise untrapped input.

Maybe create an overlay canvas in your hierarchy beneath the other canvases? I would then create a clear overalay button spanning the screen that would detect if I clicked on that canvas, but because it’s last in the hierarchy, it’s OnClick function would only be initiated if there were no other canvas on top of it.

That’s true, but so far as I understand it, ALL overlay canvases are placed on top of the 3d scene, and the world space canvases will be in that 3d space.