2 cameras running the same time

Source: Internet
Author: User
Tags radar

Http://forum.unity3d.com/threads/44911-2-cameras-running-the-same-time

1: Two camera instances are displayed on one screen at the same time.

It is certainly possible to have multiple cameras at once. There are a couple things to know that will help with this:

-Cameras have a "depth" property. This determines which order
Cameras will draw. The camera with the highest depth will draw on top
Of the camera with the lowest.

-Clear flags are important when dealing with multiple cameras. This
Basically says what to do with the empty space around whatever
Camera is drawing. The foreground camera shoshould be set to depth only.
This will allow you to see the contents of the background camera.

-Culling masks are also useful. These allow you to control what content gets rendered with which camera via layers.

I hope that helps. Check out the camera page in the documentation for more info.

 

2: Create a radar map with a red dot to show yourself and your enemy's position.

I 've done what you want on the iPhone like this ....

1. With the gameobjects you want to appear on the "radar", each one
Needs to have a child gameobject that is something like a simple sphere.
No colcyclers or physics on the sphere.

2. These spheres need to be assigned a unique tag... maybe name it "radarviewonly ".

3. On the main camera (the camera that is used for your regular game
Play), change the culling property to not include "radarviewonly ".

4. Now position a new camera (the radar camera) up high, directly abve
The main camera, and have it looking straight down. Set this camera's
Culling property to only include "radarviewonly". And set the clear flag
To depth only.

5. If you want the radar view to seem to appear in a window. You shoshould
Place a 2D plane, with the texture that you want to use as the window,
As a child of the radar camera, set it's tag to "radarviewonly", and
Have it positioned facing the radar camera and far away.

3: multiple camera views are located in the same Windows directory.

Http://answers.unity3d.com/questions/10206/how-can-i-show-split-screen-or-multiple-camera-vie.html

 

Rendertexture looks like a powerful tool, but can't this just be done with an extra camera limited to the top right corner of the screen?

Create another camera. In the Inspector Take A Look At "normalized view port rect", and change the values to this:
X: 0.7 Y: 0.7 W: 0.3 H: 0.3 this will place the new camera window on the top right of the screen.

Make sure you remove the component audio listener from the new camera, as there shoshould be only one in a scene.

Correct me if I'm wrong, I'm still a beginner with this unity stuff

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.