Hi there,
I got a question about OnMouseOver, OnMouseDown and OnMouseExit. The documentation doesn’t solve my problem. I have an object with a collider and when I move the mouse over it, I want it to glow. The effect should stop if i move my mouse away from the object of course. It’s working pretty good with the following script i wrote:
var factor : Color ;
function OnMouseOver () {
renderer.material.SetColor("_Emission", factor);
}
function OnMouseExit () {
renderer.material.SetColor("_Emission", Color.black);
}
Here is the problem: When I hover over the objects, it glows. If I leave the object it recieves it’s old color back. But when I hover over the object and click with the mouse, it stops glowing, until I move the mouse at least 1 pixel. Then it glows again perfectly. How can I fix that?
Greetings,
Thoro