# 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:** 1\
**Showing post:** 5

<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.

---

_[View the full topic](https://forums.unrealengine.com/t/onbegincursorover-and-onendcursorover-not-working-properly/2269329)._
