Using On Begin Cursor Over in a third person shooter

Hi!

I’m currently using the Outline Material from this blog Tutorial – Creating outline effect around objects | Unreal Engine 4 blog

I’m trying to use as much as possible the engine features, such as the “On Begin Cursor Over” to detect when the player is pointing toward an object i’d like to outline.

However, as you can see in the video below, the cursor doesn’t follow the crosshair, thus not working as intended.

Is there anyway to use this feature properly?
I tried setting the cursor position at the middle of the screen, but it wasn’t elegant at all, and I feel like it would cause me more trouble than anything else.
My plan B would be to linetrace on a timer, but I feel like this is still not efficient compared to using the engine features.

Here is the video:

Hello! Are you working with CPP or BP?

Many thanks!

I’m using Blueprints.

After some readings, it seems like line tracing isn’t very costly in terms of performance, especially here where I could call it ever 100ms or 250ms, I’ll probably use this technique instead.

Ok! See also this articles