Author Topic: Two cameras at 50% each of width  (Read 1521 times)

scalant

  • Guest
Two cameras at 50% each of width
« on: October 05, 2013, 07:20:39 AM »
Hello.

I have the split screen in two, I have two cameras and a camera represents at each of the sides.
How I can use Ngui on one side and make it look good?
NGUI Texts are always centered although the camera occupies only 50% of the screen.
Not suit the proportions of the camera (50% width, half of the screen).

Thanks very much.

OnlineCop

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 51
    • View Profile
Re: Two cameras at 50% each of width
« Reply #1 on: October 05, 2013, 07:38:04 PM »
Are the two cameras you're using being used only for your UI, or do they display something else (like parts of a scene)? Unless you want to finagle your z-depths around, I'd strongly suggest creating a dedicated camera (or cameras) for the UI elements so they can always be drawn on top of everything else.

Personally, I'd use a single camera for the UI and just place buttons on both the left and right side. Then those buttons would be batched to a single draw call (two draw calls if you use labels with fonts).

scalant

  • Guest
Re: Two cameras at 50% each of width
« Reply #2 on: October 07, 2013, 09:37:18 AM »
It´s not for UI elements like buttons... I want to use HUDText with 3D scene objects. But when I divede the screen to fifty percent I´m not be able to match the labels to objects. Labels act as if the screen was complete.
There any way to set the NGUI 2D camera so it matching with "main camera" that does not fill the screen (only 50% of the width, for example)?
Is there any solution?

Thanks.

scalant

  • Guest
Re: Two cameras at 50% each of width
« Reply #3 on: October 07, 2013, 11:51:29 AM »
Problem solved.
Just change the camera properties included within UI Root(2D).
How clumsy I did not realize before.

Thanks anyway.