- Home /
Second camera has higher depth, but terrain still occluding camera image.
I have a main camera which is attached to my player object with depth 0. I then have a stationary camera with Normalized VPR at X: 0.1, Y: 0.1, W: 0.1, & H: 0.1. This stationary camera also has the Clear Flags set to "Don't Clear" and the Culling Mask set to just my object.
When the game is run, the figure of my object is displayed in the bottom left of my screen with a transparent background (just like I want). However, when I move my player up near an object or when I look towards the ground, the terrain or my other objects are rendered partially or totally in front of the stationary camera, even though my stationary camera is set to depth of 1. I tried changing the Near Clipping Planes on each camera, but while it does reduce the effect, it doesn't prevent it (and causes other issues with rendering and collisions distances).
Any idea how I can get this to stop occurring? I need the object on the stationary camera to also render to the main camera, so I can't change the main camera's layers. Also, I don't have Pro (yet), so I can't render to texture (the easy answer).
Thanks for your help!
Answer by Mike 3 · Nov 14, 2010 at 02:16 PM
The second camera should be Clear Depth, not Dont Clear