Author Topic: NGUIMath.CalculateAbsoluteWidgetBounds() 's probleam  (Read 3511 times)

shokinhan

  • Guest
NGUIMath.CalculateAbsoluteWidgetBounds() 's probleam
« on: May 27, 2013, 01:34:26 AM »
I use the tunction NGUIMath.CalculateAbsoluteWidgetBounds(tran) , the tran object has a sprite, then i get the center position.
But the position's look like  has a lot of pixel offset.




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUIMath.CalculateAbsoluteWidgetBounds() 's probleam
« Reply #1 on: May 27, 2013, 11:21:52 AM »
The returned value is in world coordinates, so I highly doubt that this is what you want. You need to convert them to screen space for them to be useful.

shokinhan

  • Guest
Re: NGUIMath.CalculateAbsoluteWidgetBounds() 's probleam
« Reply #2 on: May 27, 2013, 11:53:07 PM »
Thanks