Author Topic: NGUI: Camera troubles.  (Read 2592 times)

Red

  • Guest
NGUI: Camera troubles.
« on: March 02, 2013, 06:21:07 PM »
So, I have decided to try out the evaluation version to see if it's something worth buying (so far the answer is yes... with a possible hitch.)

See, I've been using Playmaker and this is a 3d scene and i have a fair amount of behavioral coding already made to the existing camera system and the tree that i have is an object structure set up like this.

Camera Matrix (this controls position)
->Main Camera (this controls camera orientation.)

It isn't as simple as the diagram also leads to believe because there are a lot of behaviors coded in to control things like camera changes for cut-scenes, changing the camera's focal point, changing the camera target... the system i have set up is pretty robust as is.

Thing is, every tutorial i see tells me i have to delete the camera. why can't i just tell it to use this camera instead of having to make a new one? i tried copying over the scripts to this other camera system and since the camera for ngui has a game-object above it on the hierarchy, this follows the same sort of structure i have as well. I can't be expected to have to dismantle this entire camera structure for me to be able to use Ngui... that's just not feasible (and sadly, it's a deal-breaker I'm afraid.)

Can someone point me in the right direction so that i can preserve the camera system i have set up while also using Ngui?
« Last Edit: March 02, 2013, 06:25:05 PM by Red »

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: NGUI: Camera troubles.
« Reply #1 on: March 02, 2013, 08:09:12 PM »
Don't be scared off by what the tutorial says. You can have a game camera and a UI camera separate to each other. You should set up a Layer in unity specifically for your UI so it doesn't interfere with the other camera, and set the UI camera to only render that layer, while the game camera renders all the other layers.

Red

  • Guest
Re: NGUI: Camera troubles.
« Reply #2 on: March 02, 2013, 11:32:00 PM »
Aaah, thank you!

I'd be mortified if i had to re-code the camera systems this far into development.