- Home /
Multiple cameras assigned different depths
I want to try using multiple cameras and assign different depths but I can't seem to get it to work. I am presently using the free Unity. From the documentation, Cameras are drawn from low depth to high depth. A camera with depth 2 will draw on top of camera with depth 1.
My interpretation is that one may use multiple cameras simultaneously.
So how about it guys, is this true! I want to see this work.
Thanks CSDG
Sure, it's absolutely commonplace to have multiple cameras. All Unity projects (other than just test projects) use many cameras. Be sure to get the clear flags right as JA explains.
Answer by Jesse Anders · May 22, 2011 at 04:38 AM
So how about it guys, is this true!
Yes, you can use multiple cameras simultaneously.
You didn't specify what the problem is, but make sure the clear flags for the cameras are set appropriately (for example, if things are set up incorrectly, one camera might render over the output of another camera completely, giving the impression that only one camera is working).
Answer by UniteMage · May 22, 2011 at 04:52 AM
This is great.
This is how I set up the cameras.
For the special effect of having stars (particle emitter) against a black material attached in the Stars-Camera. This camera had a depth of 1. So it will be drawn first. I did not set the depth flag on this.
In the Main-Camera, I set at a depth to 2 used this camera for the scene level. I did set the depth flag on this camera.
WOW my spaceship looks great against the stars flickering in and out.
thanks CSDG
Your answer
Follow this Question
Related Questions
Rendering when 'moving a character controller through a "portal"' 2 Answers
2 Cameras: Top one doesn't render on mobile only (but colliders are still hit) 1 Answer
Run a simultaneous "viewer" build. 0 Answers
Rendering different cameras with the same depth? 1 Answer
Camera layering : UI shader is cleared by second camera with Depth Only flag 1 Answer