VR User Interface -- Attached to camera but with deliberate slight delay?

Hi all,

So I’m making a VR first person game using Blueprint and I’d like to have a 3D UMG widget component be attached to your camera, like a health bar always in your lower-left area.

However, I’d like the movement of the widget to be slightly delayed or “lagged” behind my HMD rotation. Basically I don’t want it to be perfectly parented to my camera movement, that feels weird in VR, like it’s “stuck” on my eyes or something.

An example of this would be how Robo Recall does it, see what I mean here: Robo Recall Adventure || E01 || Intro [Let's Play // Oculus] - YouTube
The point widget near his guns is always in the same relative area on your screen space but it sort of lags very slightly in its movement when the player rotates his head around, makes it look more natural.

I tried using MoveComponentTo in Blueprint but it doesn’t quite look right. Wasn’t sure if there was a better way to approach this.

It’s kind of a difficult question to phrase, so I didn’t have much luck with my usual google-fu techniques. Sorry if my question is unclear, I can clarify if it’s not easily understood.

Any help at all would be greatly appreciated!

Thank you.

Just in case someone finds this and wants to know how I resolved this…

I ended up getting this effect working by using a tick that records into an array the position vector of a null that is parented to your camera (and invisible) and in the position you would like it to be in.

Then, on the UI widget actor that you want to have a slight delay, on a tick setWorldLocation to the position vector that is 2-5 behind/up from the last index of the array. Basically it moves your UI widget where your camera was looking 2-5 frames ago, giving the UI a nice smooth animation that doesn’t look weird.

And to make sure the array doesn’t get too huge, once the array hits 20 elements I clear the first 15 entries or so.

There’s probably a more efficient way to do this, but at least I got it working! :slight_smile:

Just slap your widget on a camera swing arm. Turn on camera lag and done.

Now if I could just figure out how to solve the 3dwidget clipping issue in world space.