API ReferenceSandbox.VR

VROverlayclass

VR overlays draw over the top of the 3D scene, they will not be affected by lighting, post processing effects or anything else in the world. This makes them ideal for HUDs or menus, or anything else that should be local to the HMD or tracked devices.If you need something in the world, consider using WorldPanel and WorldInput instead.

objectVROverlay
Namespace
Sandbox.VR
Assembly
Sandbox.Engine
Declaration
public class Sandbox.VR.VROverlay

Obsolete

Unsupported by OpenXR. Please use WorldPanel.

Constructors1

Showing 1 constructors

Methods4

Showing 4 methods

protected virtual override void Finalize()PROTECTEDVIRTUALOVERRIDE

Returns:void

public void SetTransformAbsolute(Transform transform)PUBLIC

Sets the transform to absolute tracking origin

ParameterTypeDescription
transformTransform
Returns:void

Properties8

Showing 8 properties

public Color Sandbox.VR.VROverlay.Color { get; set; }PUBLICGETSET

Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity.

Returns:Color

public float Sandbox.VR.VROverlay.Curvature { get; set; }PUBLICGETSET

Use to draw overlay as a curved surface. Curvature is a percentage from (0..1] where 1 is a fully closed cylinder. For a specific radius, curvature can be computed as: overlay.width / (2 PI r).

Returns:float

public Vector2 Sandbox.VR.VROverlay.MouseScale { get; set; }PUBLICGETSET

Sets the mouse scaling factor that is used for mouse events.

Returns:Vector2

public uint Sandbox.VR.VROverlay.SortOrder { get; set; }PUBLICGETSET

Sets the rendering sort order for the overlay.

Returns:uint

public Sandbox.Texture Sandbox.VR.VROverlay.Texture { get; set; }PUBLICGETSET

Texture that is rendered on the overlay quad. `Sandbox.TextureBuilder`

Returns:Texture

public bool Sandbox.VR.VROverlay.Visible { get; set; }PUBLICGETSET

Shows or hides the VR overlay.

Returns:bool

public float Sandbox.VR.VROverlay.Width { get; set; }PUBLICGETSET

The width of the overlay quad. By default overlays are rendered on a quad that is 1 meter across.

Returns:float

On this page