Using a second camer in a scene just for rending job on top of screen

Hello Everyone,

im working at the moment on a scene, where i have multiple 3d objects.
i implemented multiple cameras (could be improved to just one camera which gets attached to the object in runtime) and added it as a child component to the 3d object with a direct ortogonal look onto the 3d object.

i tried to find a solution for the following problem but didn’t had luck yet:

the camera who shoes the object should act like a preview, hes showing the object my mouse is over, in the middle right on the screen.
Sadly when my mouse is entering an object, which then lies under the “preview” the “OnMouseEnter” is called twice, as he also mentions the collider shown by the “preview” camera.

is there a way to tell a camera that he shell do not propagate the collider or even react with the mouse? i just want the camera to be render the 3d object as the “top” object shown on the scene in the screen as long as my mouse is over it, without any colliding or anything.

also, as i have multiple objects in this scene, who also could lie close together, i tought about if its possible to just show the object in the renderer where the camera is attached to. (i could use different layers for this and tell the camera which layer he has to show, but i would like to use one layer for all the objects and then find a way to only render the “parent” object in the camera.

sadly i didn’t found any option on the camera script yet to do this. if anyone have some tips for me, i would highly appreciate it :slight_smile:

Greetings
Gardosen

Modify the preview object so it’s just the mesh? Remove the script (which is where OnMouseOver lives?) the collider, and change the layer (just in case.)

But, I found enough things OnMouseOver didn’t do well (years ago, so maybe different now,) that I just raycast everything. Which solves the 2-cam problem (you only raycast from the camera you care about.)