mouse events (click, cursor over, etc) does not work well on same blueprint class.

Hi,
I create a blueprint class with a static mesh component, it can change the mesh’s material when cursor over the mesh or click it. but, when drag my blueprint class into level, and change the static mesh to other mesh, some mesh can fire the mouse events(seems only part of the mesh, not whole mesh), some mesh does not.

The issue video:

I checked the mesh, there is not different from other mesh that can fire the mouse events.

How to fix this issue?

Thanks.

Solved: there is hidden object block the mouse event.

Can you post up your blueprint? Also try turning on debug lines so you can see whats happening with the mouseover too and output what the actor it’s hitting is

Here is my blueprint:

And where can I turning on debug lines?

Thanks.

Ok Im not sure how well the “begin cursor over” works but it seems like thats probably what the issue is.

Personally I put in the player controller and use a “get hit result under cursor by channel” from there you can get the hit actor and then cast to it to fire off your change material event. I haven’t had any problems with this so it might be worth a shot for you.

But, there are a lot of different blueprint classes, and how to know the cursor end over the mesh, every tick need to test “get hit result under cursor by channel”?

All of your blueprints that you want to interact with should be of the same blueprint class. You can either change the actual mesh on them or have them child blueprints. Getting the hit result under cursor on tick is not a problem, it is pretty much already doing this to try and do your “actorbegincursorover” anyway

Though “get hit result under cursor by channel” I fund there is a hidden object block the mouse event, and use blueprints interface can interact with different blueprint class. Both way can work now.

Thank you.