I have a blueprint including a model, which if the player looks at, would change it’s material.
The problem is that this…simply doesn’t work. Even if on begin play I turn the cursor on, and hover it on the model, nothing happens…
Here’s the blueprint:
Anything I’ve missed? Would be grateful for any help.
Im having the same issue, what i ve noticed is both the onBeginCursorOver and onEndCursorOver both fire for a moment if I click. but nothing gets fired for simply moving the mouse over the intended geometry
I had the same problem and it was because the OnBeginCursorOver-Events don’t work when a widget has its visibility set to ‘Visible’. After I set the visibility of my HUD-Widgets to “Self Hit Test Invisible” the events were fired properly.
I found that if you have more than 1 collision components, says 1 for Melee Radius and 1 for Vision Radius. The outer one will take CursorOver responds and the inner one will never fire.
I spend almost a day to figure it out.
Hopes this help someone.
I too had a problem with BeginCursorOver not firing, and after MUCH frustration, I found that (as hvfn pointed out) the Self Hit Test Invisible WAS the answer to my problem. However, I didn’t realise that this can be set at each node of the UI hierarchy. In my case, the parent was set to Self Hit Test Invisible, but the canvas panel beneath it was NOT… so that was blocking the event. So, in summary, this worked for me:
Set the EnableMouseOverEvents on the PlayerController
In the Static Mesh Actor, set the collision preset as required, as long as the Trace Response->Visibilty checkbox is set to Block
Make sure that each node of your HUD is set to Set Hit Test Invisible unless that node needs to respond to events (note that the Graph tab->Class Defaults value only applies to the very root of the HUD hierarchy: you need to set the values in the Designer tab)
I had this problem, and it was the mesh. The coffee cup worked. The skull didn’t. I tried to add collisions to the skull but it didn’t work or I did it wrong. In the end, I added an invisible sphere, used that as the “On Mouse Over” component, and called it done.
Had a similar problem , found that I didn’t check the mouse over events on player controller.
As I’m currenlty learning I’m doing lots of little projects from scratch to make sure I can build things by remebering but , every time this catches me.
I was wondering wouldn’t it be simple enough for Unreal to check during compile time, to say that is generates an error or warning if you call events that’s otherwise disabled in the player controller or similar.
I’m not asking for it to just be switched automatically but maybe a prompt
Just wanted to let you know that this was the solution to my problem. It is tricky because before I added my HUD all the mouse events were fine and then I started working on my HUD and next thing I know all the previous mouse actions were not working. So thank you for posting what you found.