Camera's on a Heads up display?

Is it possible if you can for example see one of your teammates first person view in your HUD or in other words see what the other players camera can see at the top of your screen, kinda like in GRAW2 (Ghost Recon Advanced Warfighter) you can see your teammates view in the upper Left corner of the screen…
well they say a picture is worth a thousand words so, here you go

thanks

Yes, you can do that using render-textures. With render-textures you can have a camera (your teammate’s camera for example) render directly into a texture, and you then use that texture as part of your GUI. This is also used for things like rear view mirrors in driving games, overhead map displays, etc. Keep in mind that render-textures are supported in Unity Pro only.

Great, Thanks but do you know anywhere I can find an example in my case?

Read the docs and go from there. It’s very easy to set up, really, just jump in and give it a try with a basic texture on a box or something. From there it’s just standard GUI stuff to display that texture. :smile:

Mkay, Thanks Higgy

Quick thought. Wouldn’t using a second camera set to a higher depth level work?

Just scale it to display in the corner instead of split screen style.

That could be done as well, good catch on that as that would be supported in both Indie and Pro. :smile:

Hopefully it helps. I got myself Indie so always looking at what works with it :slight_smile:

It dosent give very much documentation on the viewport rectangles… any other in depth leads?

Not sure what you mean by Depth leads but I ran a quick demo of this before posting to make sure it would work (super cheap demo)

The camera depth for the windowed image was set to 1, since the main camera on my char dummy was 0. I then just tweaked the Width and Height and positions until it displayed were I wanted it to. Looks at least with my little attempt that screen size could alter the size of my second camera quite a bit. May need an initialize script to set it based on screen dimensions.

Hmm… I’ll look into it lol, thanks