Adding 3D gizmo to camera

I have an app that basically lets the user rotate and view a 3D model. I want to add a 3D gizmo, similar to the one in the Unity Editor to the camera to help them orient themselves as they rotate - basically the gizmo just mirrors the rotation of the model, but had clear axes marked:

I’m not sure how I can accomplish this, especially pinning the gizmo to the corner of the screen, since its not an canvas UI element. Should I use a second camera and render out some sort of render-texture and then display it on an image component that is pin to the canvas? Or is there a better way?

Thanks in advance.

Create the gizmo and place it on a new layer called ‘gizmo’.

Add a 2nd camera and set its Clear Flags to ‘Depth Only’.

Set the camera’s culling mask to only render the ‘gizmo’ layer.

Set the camera’s ‘Viewport Rect’ X and Y to 0.8 and 0.7 respectively. This will render the gizmo in the top right of the screen.

Go make a cup of tea and then enjoy the view.

1 Like

Ah sweet, thanks!