- Home /
Hide GUI if it's out of camera Viewport?
My problem is this:
How can I prevent the health bar from going into the minimap as shown in the picture? The main camera's viewport ends at the start of the Inventory GUI, in case that can help solve anything.
Thanks
Answer by Julian-Glenn · Jul 08, 2013 at 11:26 PM
Put the Health Bar on another layer that is not rendered by the main camera? If your compass Map and inventory are being rendered by the main camera move them to a second camera with a culling mask that only renders the inventory and mini / compass map.
This might help:
http://docs.unity3d.com/Documentation/Components/Layers.html
I don't see how this would solve the issue, because would it not still overlap the other $$anonymous$$imap camera anways?
Right now I have the main camera(Where you see the player and everything), and then the $$anonymous$$imap camera. When you're saying move them to a second camera, do you mean a new (third) camera?
Your answer
![](https://koobas.hobune.stream/wayback/20220613105726im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Camera Viewport Shape 0 Answers
Can the Camera be Positioned on the Game Screen through code? 0 Answers
Detecting camera viewport on mouse down? 1 Answer
what concept is used here ? 1 Answer