# Begin Cursor Over Event Tick Functionality

**URL:** <https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [May 23, 2024, 7:01am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784 "2024-05-23T07:01:35Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eldritche](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eldritche](https://forums.unrealengine.com/u/Eldritche)\
**Post date:** [May 23, 2024, 7:01am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/1 "2024-05-23T07:01:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SimpleAndComplex](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SimpleAndComplex](https://forums.unrealengine.com/u/SimpleAndComplex)\
**Post date:** [May 23, 2024, 7:15am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/2 "2024-05-23T07:15:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 23, 2024, 7:20am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/3 "2024-05-23T07:20:40Z")

</div>

> [@Eldritche](#):
>
> setting a highlight material

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/e/2aed961dfc505d5095b56d48d5087dd530636537.png)

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

---

<div class="post-metadata">

**Author:** ![Eldritche](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eldritche](https://forums.unrealengine.com/u/Eldritche)\
**Post date:** [May 23, 2024, 7:45am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/5 "2024-05-23T07:45:15Z")

</div>

Thank you. 🙂

---

<div class="post-metadata">

**Author:** ![Eldritche](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eldritche](https://forums.unrealengine.com/u/Eldritche)\
**Post date:** [May 23, 2024, 7:45am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/6 "2024-05-23T07:45:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 23, 2024, 7:46am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/7 "2024-05-23T07:46:41Z")

</div>

> [@Eldritche](#):
>
> The problem is that End Cursor Over triggers as soon as I move the mouse over the mesh.

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.

---

<div class="post-metadata">

**Author:** ![Eldritche](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eldritche](https://forums.unrealengine.com/u/Eldritche)\
**Post date:** [May 23, 2024, 7:51am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/9 "2024-05-23T07:51:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 23, 2024, 8:00am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/10 "2024-05-23T08:00:24Z")

</div>

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:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/f/6/3f67ec625662b08c40ef230053e41a482cfa7768.jpeg)

Would produce:

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

---

<div class="post-metadata">

**Author:** ![Eldritche](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eldritche](https://forums.unrealengine.com/u/Eldritche)\
**Post date:** [May 23, 2024, 8:18am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/11 "2024-05-23T08:18:46Z")

</div>

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

 ![Screenshot 2024-05-23 111741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/7/e17f31c035b3ca6ac49d86a9d25db39bf4288368.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 23, 2024, 8:25am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/12 "2024-05-23T08:25:18Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![Eldritche](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eldritche](https://forums.unrealengine.com/u/Eldritche)\
**Post date:** [May 23, 2024, 8:31am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/13 "2024-05-23T08:31:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Eldritche](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eldritche](https://forums.unrealengine.com/u/Eldritche)\
**Post date:** [May 23, 2024, 8:41am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/14 "2024-05-23T08:41:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [June 22, 2024, 8:41am UTC](https://forums.unrealengine.com/t/begin-cursor-over-event-tick-functionality/1868784/15 "2024-06-22T08:41:47Z")

</div>

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