I’m using the Widget Interaction component to allow my player to interact with 3D widgets in the world. It works great except for when the character is moving (such as riding an elevator). What happens is that the widget interaction component virtual mouse position (the red dot, as seen by enabling ‘debug’ in the WIC) is always lagging behind the actual mouse position, which (even at slow speed) can be way off where it should be. Then, as the elevator comes to a stop, it catches up and the virtual mouse converges with the actual mouse position again.
Is there any way to get the mouse interaction source to have no lag? Or is it referencing actual mouse position from a previous tick and that’s why it’s always behind?
10 Months later, I’m still trying to solve this. It seems like the widget interaction hit location is one or two frames behind the current mouse position. I’ve tried changing the TickGroup but that doesn’t have any effect. Anyone have any other ideas?
Okay, well I managed to find a solution, though it wasn’t terribly intuitive so I’ll post it here for the lonely soul who finds themselves in this same position years from now.
Change the Widget Interaction Component’s “Interaction Source” from “Mouse” to “Custom” then compute the distance your actor travelled since the last tick. Next set the line trace start to be the world location of the mouse pointer plus the previous tick’s travel distance - essentially you’re offsetting the start position to account for the lag. Plug the hit result from the line trace into the Widget Interaction Component’s “Set Custom Hit Result”. It’s a little hacky but it seems to work very consistently. Good enough for me to close an issue that’s been backlogged for 10 months and get on to more exciting issues.
Hey there - looks like I’m the lonely soul!
Just wanted to say your fix works perfectly - the inertia of my character moving with the ‘Mouse’ Interaction Source was bogging my world inventory widget.
Thank you very much!