Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: franktinsley on October 08, 2012, 03:41:28 PM
-
I have a 3D UI setup so I can use slick 3D animations and everything was working great until I tried to get some relative positioning working. I can make it work no problem on a 2D UI but when I try to add it to a 3D UI I get a lot of weird results. Is there an example or tutorial somewhere showing both relative UI placement (i.e. buttons that stay near the corners of a screen when it changes aspect ration) AND a 3D UI? I can't seem to find how this is supposed to be setup.
-
Why are you using anchors here to begin with? Just position your objects yourself like you would any other game object -- by moving them in the scene view.
-
Well, as I understood it, UIAnchors were used to position objects relative to the screen or other things. Maybe they don't make sense in the context of a 3D UI?
-
Don't use them on individual components. It's more for anchoring groups of wigets (think: parent game object).
-
I figured out what I was doing wrong. I had anchors as children of panels. This appears to not be how they're intended to be used. Once I started animating my widgets differently to make them move together without keeping them in a single panel it all started to work. I've got 3D UI AND relative positioning! Yay!
-
Yes but you also got more draw calls...