|
I am trying to create a mouse over event for buttons in my OnGUI method. The popular suggested way to do so is to use the Rect.Contains method; however, if I use GUIUtility.RotateAroundPivot then my Rect positions are in the wrong locations. How can I rotate the GUI elements, and then manipulate the Rect by that GUI.matrix?
(comments are locked)
|

RotateAroundPivot is the function to modify the GUI.matrix. Is the pivot point at the position you intend?
Yes. All of the rotated GUI objects are at the desired locations. But I don't know how to use that modified matrix to rotate a rectangle to do a Contains check.