Author Topic: relative coordinate system  (Read 6942 times)

realblues

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
relative coordinate system
« on: May 19, 2012, 09:47:59 PM »
NGUI has a good system for SD/HD atlas switching, but position problem not cleard for me

Almost widget woks good with ui anchor, but stiil some other widget needs positioned relatively by resolution. like range in 0 ~ 1.0.

Is it already supported?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: relative coordinate system
« Reply #1 on: May 19, 2012, 10:24:41 PM »
UIAnchor has the "relativeOffset" property you can modify to achieve relative positioning.

realblues

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: relative coordinate system
« Reply #2 on: May 19, 2012, 10:42:23 PM »
WOW  it's perfect!!

Thanks  :) :) :)

realblues

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: relative coordinate system
« Reply #3 on: May 19, 2012, 10:48:19 PM »
I have one more,

is Gameobject have no problem consist with UIsprite and UIAnchor? UIAnchor should be woking with my sprite indivisually.

and.. can i request "AddUIAnchor" in the NGUI Menu?

It looks working well but just for make sure :)
« Last Edit: May 19, 2012, 10:53:43 PM by realblues »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: relative coordinate system
« Reply #4 on: May 19, 2012, 10:53:41 PM »
Generally you want to anchor an empty game object, and then your widgets will be parented to that object.

realblues

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: relative coordinate system
« Reply #5 on: May 19, 2012, 11:19:57 PM »
OK, Thnaks :)