Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: vidjogamer on April 18, 2014, 10:29:42 AM
-
Hello, I am trying to use an advanced anchor to position 3 sides of a widget to the sides of a screen, the 4th side is supposed to be variable based on a game object. I figured this was the perfect time to use anchors. But the anchors are not behaving as I would expect.
Ive attached some images that hopefully demonstrate what is happening. the right side of my widget is anchored to a sphere in the scene. I expect the widget to resize to the spheres position when I move my sphere around. Instead when I drag the sphere around, the right side of my widget just kinda bounces around pseudo randomly.
-
So it seems to work properly if the anchor object has a component derived from UIWidget. This will work. Are empty game objects not supposed to work?
-
Empty game object works fine. Note the difference in layers. Game objects on the "default" layer are drawn by a different camera, so their position on the screen isn't the same as your UI objects.
When you create a widget, it's forced onto the UI layer.