- Home /
Drawing a GUI box by specifying the two corners
Hi, everyone. I was wondering if it was possible to draw a gui box by specifying the top left and bottom right corners. I am trying to make a selection box but it isn't working, because the mouse y gets inverted. Any help is appreciated!!! :)
Comment
Best Answer
Answer by Eric5h5 · Mar 14, 2011 at 10:56 PM
Use Event.current.mousePosition in OnGUI functions, not Input.mousePosition.
Thanks, that helped a lot. Any idea how to set the start corner to where the mouse is when the player pushes the button?
See the selection box code here, though you'd have to adapt it for OnGUI: http://www.starscenesoftware.com/vectrosity.html