- Home /
Mouse events only fired once, why?
I have a plane with a box collider, with which I want to respond to mouse events. (OnMouseOver, Down, etc.)
However the mouse events only trigger once, and don't work again when I hover the mouse over the plane.
I don't have an Update function or a Raycast set up. Do I need to?
On$$anonymous$$ouseDown/Up/Over etc are all framerate functions. They should always respond at any point of your mouse commands. Can you post some code snippets so we can get an idea of what may be going wrong?
In my $$anonymous$$onobehaviour class, just this:
void On$$anonymous$$ouseOver() {
Debug.Log("$$anonymous$$ouse over object.");
}
Answer by Eric5h5 · Jul 09, 2012 at 02:36 AM
Turn off "collapse" in the console.
When I see "such-and-such only happens once!" that's my default answer, which is right about 99% of the time. ;)
Your answer
Follow this Question
Related Questions
OnMouseOver() OnMouseDown() button raycast help 1 Answer
OnMouseDown for Right Mouse 2 Answers
How can I call OnMouseDown() from an outside script? 1 Answer
How can I make a section of an object react to my mouse being on it or my mouse clicking on it? 0 Answers
RaycastHit only way to do OnMouse events for colliders in Mobile? 0 Answers