Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: oguztecimer on December 22, 2013, 04:25:34 AM
-
Hello, i need to change the position of an object by taking reference from main camera. I need to find its position on ngui camera and to do that i am using;
nguiCamera.screenToWorldPoint(mainCamera.worldToScreenPoint( objectPosition ))
mainCamera.worldToScreenPoint returns the right value, but nguiCamera.screenToWorldPoint returns a really absurd value. I also tried entering the values manually but i get values like (9999,0.1,0) where it should return (0,0,0).
I know its not very clear but i can give more information if you need.
Thank you,
Oguz Tecimer
-
It should work fine. I'd use WorldToViewportPoint/ViewportToWorldPoint, however.