Hi,
I’m doing some tooltips, and I want them to follow my mouse cursor.
I’m using :
in the “on Update”
MX = Input.mousePosition.x;
MY = Input.mousePosition.y;
in the “OnGUI”
GUI.Button(new Rect(MX, MY, 75, 75), "", MyGuistyle);
And my button isn’t on the mouse position, and the Y axis (height) is inverted(reflection on the horizontal axis), when I go up the button goes down.
is the problem could come from this line ? (resize the GUIs)
GUI.matrix = Matrix4x4.TRS(new Vector3(0f, 0f, 0f), Quaternion.identity, new Vector3(horizRatio, vertRatio, 1));
this is my first line in my On GUI.
Here is a screenshot (i put the mouse position in red (no cursor in print screen))
Any ideas for where it come from or how to correct that ?
Cheers
BooBi