Camera doesn't clear

Hello,

My name is Cem and I’m making a Minecraft Clicker for fun. I have two cameras, one for 3D objects and one for UI. I have a problem with the 3D camera. When set to Depth Only, it doesn’t clear. It looks really strange. I’ve searched half an hour for information at my problem, but I couldn’t find anything.

I’ve attached an image for what it looks like. By the way, I set the 3D camera to begin at the top and move down, and the chest rotates a bit.

I’ve also attached an image for my 3D Camera component.

I’d appreciate if anyone could help me! Thank you!
By the way, I’m not sure if this is the right forum to post about this, so I apologize if this is the wrong one.

Cheers,
Cem


You have to change your camera “Clear flags” to Skybox or SolidColor depending if you are using a skybox or a solid color, placing it as depth only, will only clear depth information of your scene

yeah, but if I change clear flags to one of the other ones, I don’t have a transparent background and that’s what I need because the 3D camera has to be layered over the UI.

But, thank you for considering my problem!

I didn’t understood what you’re trying to achieve, do you have an Image, or video?

Edit: Oh wait, you have LOL. You are trying to make the chest appears in front of all the rest of the game, right? you can make an different scene with only the chest and change it’s camera to overlay.
So, when you calls the chest scene you do a SceneManager.LoadScene(“scene”, LoadSceneMode.Additive), that will make the chest be rendered as a new scene over the main scene.

yeah! thank you so much for helping me! i’m going to try it out now.