Maintain Widget in front of camera in VR

Hello mates,

Just made a simple widget for menu testing ingame in VR . I am trying to maintain the widget in front of the camera but I can’t get it, I am missing something, any idea?

A little help will be nice, Here is the BP :

Have you tried simply adding a WidgetComponent to the HMD camera as a child? It’s definitely the simplest approach.

Yes, you are right, I tried and it works like a charm including interaction. Thank you so much Bsawler :slight_smile:

Now, purely out of curiosity and if anyone have some time to kindly solve this enigma, regarding the BP above, what should I have added to maintain the actor widget (or finally any object/actor) in front of the camera, which nodes are missing? The BP above works partly, the widget does appear and follow me except it appears on my right and not in front of the camera.

Looking at this on a mobile screen so can’t sit here and step through it well, but it appears that you’re just offsetting the position by a fixed 0,30,-5. But that will only work if you aren’t rotating the view. Instead what you should do is offset by the camera’s forward vector*30 for instance so it will always be 30 units in front of the camera.And then you want to rotate the INVERSE of the Z rotation for instance, so that it’s facing the camera (camera is 45 degrees to the right, object needs to be 45 degrees to the left to be “facing”).

Hopefully that makes sense!

Thanks BSawler, I will try that and come back here for talking about the results.

what **bsawler**said is spot on, As my Issue is exactly that!, I didn’t like having the menu stuck in front of the VR players face
I want to FIRST get where the player Is Looking in VR, then Spawn the widget there. and leave it there until the player closes the menu and reopens it again.