Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Abnaxus on July 11, 2013, 10:30:39 AM

Title: Recovering GO Screen Position.
Post by: Abnaxus on July 11, 2013, 10:30:39 AM
Hey again,

Here's another prob, but it might look dumb to you since you made NGUI plugin :)

I have a GO with an Anchor on it, and I'd just like to have the position of this GO in ScreenPoint (pixel tho, since you can't get iOS point value).
But since it's under a UIRoot etc, the Camera.WorldToScreenPoint() doesn't work properly (I don't know what do I have to multiply by the ratio).

Do you have any idea how I should get the screen position of my object ?

Thanks in advance.

Cheers,
Abnaxus.
Title: Re: Recovering GO Screen Position.
Post by: ArenMook on July 11, 2013, 07:13:18 PM
Knowing the camera that draws the object's layer, use Camera's WorldToScreenPoint to transform it from transform.position to screen space.