# OnBeginCursorOver and OnEndCursorOver not working properly

**URL:** <https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [January 10, 2025, 9:32am UTC](https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329 "2025-01-10T09:32:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.isometric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr.isometric](https://forums.unrealengine.com/u/Mr.isometric)\
**Post date:** [January 10, 2025, 9:32am UTC](https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329/1 "2025-01-10T09:32:30Z")

</div>

![UnrealEditor_JNjKRYGqEQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/4/7/1478426955f16f6454c9531c9a15147a4d112ba7.png)  
Its Triggering with an Offset from a Cursor I don’t know why?

---

<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:** [January 10, 2025, 9:59am UTC](https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329/2 "2025-01-10T09:59:36Z")

</div>

- `ShowFlag.Collision 1` → what do you see?
- the collider might be much larger than the mesh → open the asset and show collision there, too.
- are we sure it’s not printed by another component hiding elsewhere in the graph?

---

<div class="post-metadata">

**Author:** ![Mr.isometric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr.isometric](https://forums.unrealengine.com/u/Mr.isometric)\
**Post date:** [January 13, 2025, 8:54am UTC](https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329/3 "2025-01-13T08:54:01Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/b/1ebfcf63817e30c3533cd931f1b1fb20df6392a3.jpeg)  
after running command.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/3/9c3a4d44d4f89542cb9f2f97f1b615008d259ae1.jpeg)  
Its a Box Mesh added in Unreal.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/f/94fe7c6bf51c23a343796ee79146a6a061541269.png)  
whole Blueprint Nothing else is Triggering it.

---

<div class="post-metadata">

**Author:** ![Mr.isometric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr.isometric](https://forums.unrealengine.com/u/Mr.isometric)\
**Post date:** [January 13, 2025, 9:09am UTC](https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329/4 "2025-01-13T09:09:05Z")

</div>

> [@Everynone](#):
>
> ShowFlag.Collision 1

Weird Thing I Noticed just right now When i Do Shift+F1 for showing Cursor It Works but With Locked Cursor it Dont Work!

So whats happening to Mouse Pointer Position when Game is Played in Editor?  
is Cursor Not Centered when in First Person Template?

---

<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:** [January 13, 2025, 9:26am UTC](https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329/5 "2025-01-13T09:26:38Z")

</div>

> [@Mr.isometric](#):
>
> So whats happening to Mouse Pointer Position when Game is Played in Editor?  
> is Cursor Not Centered when in First Person Template?

But… there seems to some kind of confusion here. Are you trying to use a hidden / inactive cursor to detect OnBeginCursorOver while not actively using a pointing device to control it?! Because that kind of interaction is done with camera traces + interface. Using cursor for this will be unreliable and inconsistent _at best_.

You could probably set cursor location to screen centre but… that’s just not the right tool to do it. The traditional method would be close to this:

> [@Third person crosshair object highlight troubles](https://forums.unrealengine.com/t/third-person-crosshair-object-highlight-troubles/252041/13):
>
> The communication in the example revolves around Inheritance + Interface - a potent combo, imho. the base class implements the interface (which children inherit) the widget uses the same interface - calls children receive can be propagated: Actor → Widget Component → Widget without casting or finding user widgets (this can be done in many ways, though) the player has a collision sphere and sends an interface call to overlapped actors as we approach: [image] [image] Above, handl…

The above has a redundant extras bit for detecting interactives in proximity. The gist - we trace along a camera vector, send interface messages to the hit components, the components can respond if they so wish.

Here’s another example:

> [@Moving an object by pointing another object at it](https://forums.unrealengine.com/t/moving-an-object-by-pointing-another-object-at-it/1657869/2):
>
> See if this point_down helps with this point_up_2 particular bit. a standard forward camera trace: You’d use an interface or inheritance if there are more types to handle, ofc. not sure how you want stuff to move, here it’s via a timeline: which results in: the branches in the script prevent it from spamming since we’re tracing on Tick: Hopefully you can adapt it to your needs. It’s a setup similar to this one:

Note this has nothing to do with the mouse cursor.

---

<div class="post-metadata">

**Author:** ![Mr.isometric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr.isometric](https://forums.unrealengine.com/u/Mr.isometric)\
**Post date:** [January 13, 2025, 12:01pm UTC](https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329/6 "2025-01-13T12:01:52Z")

</div>

Thank You I think I Got it , I will Look More into Interfaces Topic

---

<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:** [February 12, 2025, 12:02pm UTC](https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329/7 "2025-02-12T12:02:13Z")

</div>

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