Author Topic: Getting 3D Objects to appear in front of NGUI?  (Read 9049 times)

ENAY

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 248
    • View Profile
Getting 3D Objects to appear in front of NGUI?
« on: August 17, 2012, 02:32:32 AM »
I have my character select done, what I want to do is have the 3D mesh of the character appear on the menu and spin around. Now I have spawned the 3D Character into the scene, but I can't figure out how to do this.

I know that NGUI is rendered to a different layer, I probably need to use a separate camera or something, but I have no idea where to start. I wish I understood Unity better.

Malzbier

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 93
    • View Profile
Re: Getting 3D Objects to appear in front of NGUI?
« Reply #1 on: August 17, 2012, 06:16:42 AM »
Make a new camera and render the on this camera (use Layer) and then render tis on top of NGUI.

Camera Depth settings Example:

Game Cam    : 0
NGUI Cam     : 1
3DMesh Cam : 2

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Getting 3D Objects to appear in front of NGUI?
« Reply #2 on: August 17, 2012, 07:26:49 AM »
What Malz says. You use a different camera fro it, because you get an additional way of layering that way.

You can even have

---game layer
---NGUI 2d
---3d stuff on top
---NGUI overlay on top of 3d layer

As much as you want, but obviously it gets tricky to keep track of.


Each camera should just only render its own Unity Layer, then it works just fine. It's what we did in Subway Surfers and Frisbee Forever 2 (if you need references).