Begin Cursor Over Event Tick Functionality

So basically I want to know if it’s possible to have Begin Cursor Over event fire continuously like an Event Tick. What I want to do is hover the mouse over a mesh and have something change (in this particular case setting a highlight material) for as long as the mouse cursor is on the mesh.

If it’s not possible, I’d like to know of any method to achieve the desired effect.

Really appreciate any help.

You can change a boolean to true, when the cursor initially comes over the mesh
Then in Tick, do your thing only if that boolean is true
On Mouse move away from the mesh, set the boolean to false

2 Likes

But this is a singular action that does not require doing something 60 times per second, right? That’s unless you’re pushing a progressing parameter into a dynamic material. Could you clarify why Begin Cursor Over is not sufficient? However, if you must have it your way, gating Tick would work:

image

And so would a conditional Branch mentioned in the previous post.

2 Likes

Thank you. :slight_smile:

1 Like

Thanks a lot for your suggestions. The problem is that End Cursor Over triggers as soon as I move the mouse over the mesh. I’m wondering if it could have something to do with the mouse sensitivity or something being wrong with it.

1 Like

This should not be happening, more info needed. Do you show a widget on top of the mesh, do you change collision settings?

I’m wondering if it could have something to do with the mouse sensitivity or something being wrong with it.

Unlikely to be hardware related. It’s the script. Essentially, something interferes with the cursor.

1 Like

Only change happens to the parameters (diffuse/opacity/emissive) of a dynamic material assigned to the mesh.

1 Like

The issue is elsewhere. This part works fine, and trying to force a solution with Tick will only create more problems. Do double check / post your script.


Under regular circumstances, the most mundane setup:

Would produce:

The question here is - what is irregular in your case? I’d investigate that.

1 Like

Thanks for the example. I actually have the same setup here.

1 Like

The question here is - what is irregular in your case? I’d investigate that.

Again, it’s most likely not about the basic material setup, this part is fine. Something else possible interferes with the cursor - at least judging by the description alone.

  • use breakpoints to ensure the data actually flows the way you expect
  • print / debug values you’re pushing into the material
  • you’re using an Overlay Material - that’s definitely irregular, perhaps it’s something related to that - try it without it. It will at least allow you to narrow the issue down or dismiss it being the cause.
  • debug mouse tracing - see what and when are you actually tracing against
1 Like

Alright, I’ll try what you suggested and get back to you. Many thanks

2 Likes

Okay so the problem was that I fed a material instance not a material to the parent input in the create dynamic material instance node. Now it’s working well, but I’m wondering if there is a way to keep the highlight material even when the cursor moves over the mesh?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.