- Home /
 
               Question by 
               icywater · Jan 11, 2012 at 04:58 AM · 
                guitexturefollowmouseposition  
              
 
              How to make a GUITexture follow your mouse?
How do I make my GUITexture gameObject follow my Mouse?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by by0log1c · Jan 11, 2012 at 05:25 AM
A short answer could be: assign the X and Y of GUITexture.pixelInset from Input.mousePosition in the Update(). They both use screen coordonates so you don't need to call any fancy conversion function. The GameObject position influences positioning so you probably want it to be Vector3.zero.
Your answer
 
 
             Follow this Question
Related Questions
Reduce Draw call for Multiple GUI Textures with same Texture 1 Answer
Collision between GUI Texture and Object 1 Answer
Space ship UI, multiple pointer that follow individual targets. 1 Answer
2D how to make a sprite follow the mouse position #c 2 Answers
camera.main update problems with screenToWorldPoint 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                