- Home /
Question by
FLASHDENMARK · Mar 24, 2011 at 09:24 PM ·
guimousepositiononmouseover
Create GUI at mousePosition.
Hello everyone :)
Is there a way that you can create a GUI that has the position of the mouse?
E.g:
function OnMouseOver () { //Set stuff to true; }
function OnGUI () { if(stuff) { //Set GUI at mouse position. } }
I do know how to create the GUI and all that but, I have no idea how to create the GUI at the position of the mouse.
Can you please help me? :)
Comment
Best Answer
Answer by efge · Mar 24, 2011 at 09:36 PM
You could use Input.mousePosition to get the position in pixel coordinates (screen coordinates) and then use this values to draw your GUI.
Your answer
