Make control panel for VR game to be invisible for player

Hello everyone,
I want make a kind of control panel for VR game (I use steamVR and HTC Vive). It’s just widget with buttons, and the one who is sitting by PC can press them and run some scripts, but player shouldn’y see that control panel.
So I think it’s can be implemented like widget but I can’t find out how make it invisible in VR glasses.
GameMode in “begin play” event just enables HMD, creates widget and add it to viewport, but it works in opposite way: widget is shown in vr glasses but invisible on PC.
How can I do it?
Beforehand thanks for your answers.

You could draw your widget as Spectator Screen Texture in this case.

How to:

  1. Create a TextureRenderTarget2D to draw your widget:

  2. Wrap your widget tree with two RetainerBoxes.

The First RetainerBox will hide your widget for HMD, and the second one will draw the widget to the render target.

  1. Create two materials for retainers:

Visibility

Draw Widget

  1. Draw Material:

  2. Hide widget for HMD:

Debug:
InvisibleWidget

  1. Next, draw your render target on the spectator screen:

I hope it’ll be helpful to you.

My Products