Is it possible that when my mouse passes over a collider, a gui.label displays a text?
thank you
[/img]
Is it possible that when my mouse passes over a collider, a gui.label displays a text?
thank you
[/img]
Well, if the object in question does this:
var showText : boolean;
function OnMouseEnter()
{
showText = true;
}
function OnMouseExit()
{
showText = false;
}
function OnGUI()
{
if (showText) {
// GUI stuff
}
}
Yes. If it doesn’t work with just a collider, try with a collider + rigidbody. (If you don’t want it to move, just set useGravity = false, and isKinematic = true;)
Thank you very much for your help, that’s exactly what I wanted to do, your code works very well.
Thank you again