- Home /
one perspective camera and one orthographic in the same scene
Hello!
In my game I have a background that is a 3D particle effect that should be rendered in perspective.
While the rest of the game is 2D and should be rendered in orthographic mode.
I tried using two cameras, one for the background and one for the rest of the game, but unfortunately the camera that renders last uses the render mode of the first one, does anyone know a workaround for this issue?
Cheers, Jelle
It is unclear to me what is going on here. Are you sure you have the 'Clear Flags' and the 'Depth' set correctly for both cameras?
Apparently I didn't, setting the background camera clear flags to 'don't clear' made the actual problem appear. Thanks!
Answer by jpostma1 · Apr 14, 2014 at 11:17 PM
Setting the background camera Clear Flags to 'don't clear' made the actual problem appear.
The background camera also rendered the rest of the scene (which was attached to the main camera so I thought only that camera would render the objects) in perspective so I thought the main camera's mode had magically been adjusted, but setting the Clear Flags appropriately made the rest of the scene appear in orthographic mode again, which made me understand that I also have to set certain layers not to be drawn by certain cameras.
Thanks again!