Hi,
I want to do tooltips wich follows the mouse.
My problem is that the Gui isn’t at the right place and when I start from the top left corner my mouse is on the GUI and when i’m in the bottom right corner the gui is still in the middle of the screen.
I’m sure it’s just a matter of finding the good equation and I’ll probably it find during my sleep but if someone has the answer now that could be usefull !
here is my script to have a moving GUI.
MX = Input.mousePosition.x;
MY = Screen.height - Input.mousePosition.y;
//print(MX);
print(MY);
TTpx = MX;
TTpy = MY;
........
else if (TTnumber == 14)
{
ToolTip = TT_Mast;
TTx = 88;
}
else if (TTnumber == 15)
{
ToolTip = TT_Rudders;
TTx = 125;
}
else if (TTnumber == 16)
{
ToolTip = TT_Trampoline;
TTx = 155;
}
GUI.Label(new Rect(TTpx, TTpy, TTx, TTy), "", ToolTip);
Here few screenshots of the problem (the red dot is the mouseposition in reality).
Thank"s a lot for the help
BooBi