S&box Wiki

VR Overlays

VR Overlays draw over the top of the 3D scene, they're not affected by anything in the world scene ( e.g. lighting, post processing effects ) making them ideal for HUDs or menus that should be local to the player's VR space.

Creating them is incredibly simple and you can pass your preexisting RootPanels to it for easy VR compatibility.

new VROverlayPanel( new MainMenuPanel() ) { Transform = new Transform( Vector3.Forward * 40.0f + Vector3.Up * 60.0f ), Width = 40.0f, Curvature = 0.2f, };

If your panel wants any mouse input your VR controllers will show automatically and simulate UI input.