How to create a HUD from an object

I want to create an HUD that requires me to use an game object instead of the regular Unity HUD.

Something Like this:

So, i was wondering how I would use this object as a HUD?
I tried attaching it to the camera but it gets affected by the light and it also goes through objects if you go too close.

Is there a way where only the camera can see it but doesn’t get effected by any environmet?

Typically this kind of thing is handled by having two cameras. One camera sees displays like HUD, the other see the scene. You have to setup the camera right to make this happen. The front camera has to have ‘Background’ set to ‘Depth Only’, and the ‘Depth’ has be greater than other camera. You put objects on different layers, and use the culling mask of the camera in order to define what layer(s) each camera sees.

An alternate solution that can work is to make the HUD a child of the camera and place it at the near clip plane. The collider on the camera has to prevent the camera from getting too close and having object intersections.

Note that Lights also have culling masks. You can specify what layers each light impacts. With your HUD on its own layer, you can turn the lights off for that layer. Or alternately you can use Unlit shaders for your HUD so that lights don’t impact the display.