Support => NGUI 3 Support => Topic started by: ricardo on November 01, 2012, 12:52:03 PM
Title: Sprite that follows mouse/touch position
Post by: ricardo on November 01, 2012, 12:52:03 PM
Hi,
I've been trying to get this to work unsuccessfully.
I have a sprite in my NGUI Scene that I want to match to my mouse/touch position. My NGUI Scene is an additively loaded scene that contains the GUI and a Camera. This is loaded by every Scene in my game when the level starts.
What I'm doing is taking the mouse/touch positon (which is in screen space) and using the GUI's camera to transform that position Screen->Viewport, then using the viewport position to set the position of the NGUI sprite.