- Home /
Info box on mouse hover
Hi!
When I have a item and I want the player to receive info about that info so they know what they will buy. So the easiest way to do this is to have a GUI box that follows the cursor when you hover over the other GUI button. So if you know how to do this, please tell me!
Thanks!
Also, please write the script in JS.
Answer by NickP_2 · Feb 03, 2014 at 03:53 PM
To check if your mouseposition is on a certain GUITexture/GUIText, use the HitTest Here, Then just set the GUI textlocation the same as the Mouse position, using this.
The PixelInset is tricky, make sure to set the objects Transform.position to (0, 0, x), because x and y (min: 0, max: 1) are relative to your screenposition, while pixelInset makes a margin from the relative position!
Your answer
Follow this Question
Related Questions
GUI.Button on MouseHover 1 Answer
How to check if player is hovering mouse over a GUI Box 3 Answers
detect mouseover with grid buttons? 1 Answer
GUI box problem? 0 Answers
my GUI.box is transparent 1 Answer