S&box Wiki

Revision Difference

vr-overlay#547947

<cat>Code.VR</cat>⤶ <title>VR Overlays</title>⤶ ⤶ <upload src="a5727/8dabd88dbc2330f.png" size="373340" name="image.png" />⤶ ⤶ 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.⤶ ⤶ ```csharp⤶ 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.