Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by ShreddinPB · Nov 11, 2011 at 10:08 PM · cameramultipledepthsorting

Multiple camera question

So I am trying to use multiple cameras, one for the game view and one for the gui made of objects. I was sure I did this before and it worked, but now I can not seem to get it to work. Create a new scene. Add a sphere and move it so it is in view of the Main Camera. Create a new camera. Add a cube and move it so it is in view of the new Camera, but not in the same screen space as the Sphere. Shouldnt both be visible? I only see the camera with the higher depth value, it just over writes the frame from the lower camera.

In this simple test scene if I set the "Clear Flags" of the higher depth camera to "Depth Only" it then shows both objects, but then one will always render on top of the other.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ShreddinPB · Nov 11, 2011 at 08:24 PM 0
Share

Forgot to add, the game play camera is Orthographic and the GUI cam is Perspective, which I think may be the issue

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by DaveA · Nov 11, 2011 at 10:11 PM

Don't you generally want a GUI to render on top of everything else? You may also play with Layers to fine-tune this stuff.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ShreddinPB · Nov 11, 2011 at 11:02 PM 0
Share

Yes you do.. but in the actual game scene, if the cameras are not both persp or both ortho it doesnt seem to work. Right now if the lower game cam is ortho, and the upper gui cam is persp, and I set the gui cam to depth only or dont clear, it still only renders the top persp camera, but with no background at all. so when you move the camera, whatever is on the screen leaves a ghost trail.

avatar image KHIZAR HAYAT · Nov 27, 2013 at 05:17 PM 0
Share

use viewport rect to handle this i think it works

avatar image
0

Answer by KHIZAR HAYAT · Nov 27, 2013 at 05:39 PM

use viewport rect to handle this i think it works

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Two cameras depth-sorting correctly (for use with blur etc.) 0 Answers

overlay perspective on orthographic camera 2 Answers

Editor Camera Perspective 1 Answer

Main Camera - Bad depth perception? 1 Answer

Can I render a single render but only with the objects that are not occluded by other objects (on other layers)? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges