- Home /
Multiple camera question
So I am trying to use multiple cameras, one for the game view and one for the gui made of objects. I was sure I did this before and it worked, but now I can not seem to get it to work. Create a new scene. Add a sphere and move it so it is in view of the Main Camera. Create a new camera. Add a cube and move it so it is in view of the new Camera, but not in the same screen space as the Sphere. Shouldnt both be visible? I only see the camera with the higher depth value, it just over writes the frame from the lower camera.
In this simple test scene if I set the "Clear Flags" of the higher depth camera to "Depth Only" it then shows both objects, but then one will always render on top of the other.
Forgot to add, the game play camera is Orthographic and the GUI cam is Perspective, which I think may be the issue
Answer by DaveA · Nov 11, 2011 at 10:11 PM
Don't you generally want a GUI to render on top of everything else? You may also play with Layers to fine-tune this stuff.
Yes you do.. but in the actual game scene, if the cameras are not both persp or both ortho it doesnt seem to work. Right now if the lower game cam is ortho, and the upper gui cam is persp, and I set the gui cam to depth only or dont clear, it still only renders the top persp camera, but with no background at all. so when you move the camera, whatever is on the screen leaves a ghost trail.
Your answer
Follow this Question
Related Questions
Two cameras depth-sorting correctly (for use with blur etc.) 0 Answers
overlay perspective on orthographic camera 2 Answers
Editor Camera Perspective 1 Answer
Main Camera - Bad depth perception? 1 Answer