Author Topic: Advice on creating 3d box with inlay menu  (Read 3104 times)

ymerkryds

  • Guest
Advice on creating 3d box with inlay menu
« on: June 22, 2012, 04:02:04 AM »
Ok so I'm all new to ngui. Just bought the package, and i really like it!

1) First, i was just curious to as why the scale of a UI Root is so small?

2) My actual question is that I need some advice on creating a menu for my game. I have a 3d model of a wooden box that the camera will be turning around. The menu should be placed inside the box as the inlay of the box. There will menus both on the inside lid and the bottom of the box. At some point the box will open and the menu should appear.
I would appreciate if someone could point me in the right direction. How would my hierarchy of gameobject look like? Where will I have my wooden box mesh? And which cameras would i want? I  figure that I need to have my buttons parrented to my box lid, in order for them to move and rotate as the box opens?

Any good advice? It is much appreciated!

- ymer

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Advice on creating 3d box with inlay menu
« Reply #1 on: June 22, 2012, 10:45:25 AM »
The scale of UIRoot is 2 / ScreenHeight. It's so that the UI doesn't appear super-massive when compared to other in-game objects. This also lets you keep the UI camera's ortho size at 1.

You'll want to use NGUI without a special camera for your purposes. Just use your game camera (attach a UICamera script to it). Your game camera will draw both the box, and the UI geometry generated by NGUI. Remember -- NGUI widgets are just scripts attached to game objects. You can move / rotate / scale them as you see fit -- as if you were manipulating a renderable mesh.

ymerkryds

  • Guest
Re: Advice on creating 3d box with inlay menu
« Reply #2 on: June 25, 2012, 02:04:59 AM »
ahh got it. That makes perfect sense! Thank you very much :)