overlay perspective on orthographic camera

Hi all,

I’ve learned a lot about multiple cameras, and I think I’ve got it mostly figured out. There’s one thing that has me stuck. I have 3 cameras in the scene, each for a specific purpose.

  1. I have a perspective camera for my 3rd person character. (depth 0, clear skybox).
  2. I have an orthographic camera for my HUD (depth 1, clear depth only).
  3. I have another perspective camera for an item in the HUD (depth 2, clear depth only).

So I want to have cameras 2 and 3 in the same position, and place the 3d object as though it’s in front of the HUD (in a thumbnail). The problem is that when camera 3 is perspective the orthographic camera 2 becomes invisible. I’m certain I’ve got everything setup right, as its only when i switch it to perspective that it disappears. I believe I have three options now:

  1. make my HUD camera 2 a perspective that appears to be flat (everything needs to align perfectly).
  2. somehow get my HUD to appear in between the gameplay and the 3d item. (maybe im missing something, this would be ideal).
  3. Use something like a renderTexture to show the 3d objects over the HUD (this sounds bad and again, everything needs to align nicely).

Hopefully someone out there knows why my orthographic is hidden behind the perspective. Or another alternative…

Might not be the case but are you sure you set the camera’s clear flags to “don’t clear” or “depth only”?

Using forward rendering seems to work, not sure why it doesn’t for the other rendering paths.