Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Bartleby on December 17, 2012, 07:37:39 PM
-
Long story short, I'm trying to build a text window that can be both dragged and resized. The idea is to use functionality similar to UIDragObject, but check to see if the mouse press is close to the edge of the window and resize instead of drag if so. Ironically enough, I ran into problems with the simplest part of the whole operation: figuring out where the click was.
Is there some easy way to convert from screen space coordinates to something relative to a particular game object? I should note that this particular object is anchored to the bottom right corner of the screen.
I'm still pretty new to both Unity and NGUI; I apologize if this is something that has been answered before.
-
UICamera.lastHit tells you the result of the last RaycastHit, including the world position of where it happened.
-
Awesome! Much appreciated.