x


Splitting the game view - part camera, part opaque navigational panel at runtime

Is it possible to split the game view? It seems that the game view is simply whatever the camera in the scene is seeing. Is it possible to limit part of the screen to showing the camera, and the other part to show a opaque panel?

more ▼

asked Dec 23 '10 at 02:23 AM

ina gravatar image

ina
3.3k 492 551 602

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

You can specify what portion of the screen a camera will render to using the camera's normalized viewport rect field.

more ▼

answered Dec 23 '10 at 02:30 AM

Jesse Anders gravatar image

Jesse Anders
7.3k 7 17 48

okay, so you do this at the gameobject level, but is there a way to do this from the global level? would you have to use a second camera for the 2d panel?

Dec 23 '10 at 02:46 AM ina

Yes, typically you'd use a separate camera for each discrete area of the screen that you want to render to.

Dec 23 '10 at 03:47 AM Jesse Anders

Is there a way to specify this by percentage? What if you don't know the target screen size?

Dec 23 '10 at 04:52 AM ina

"Screen position out of view frustrum"

Dec 23 '10 at 05:05 AM ina

Regarding your question about percentage, that's essentially what the normalized viewport rect does: (0, 0) represents one corner of the screen and (1, 1) represents the opposite corner. Regarding your second comment, I assume this is an error that you're receiving? If so, it's hard to say what might be causing the error without more information.

Dec 23 '10 at 06:12 AM Jesse Anders
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3014
x486
x374
x103
x7

asked: Dec 23 '10 at 02:23 AM

Seen: 1172 times

Last Updated: Dec 23 '10 at 02:23 AM