s&box docs
API ReferenceSandbox.UI

public class Sandbox.UI.WorldPanel : Sandbox.UI.RootPanel

An interactive 2D panel rendered in the 3D world.

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 5 methods

public virtual void Delete(bool immediate = False)

Parameters

  • immediate: Default: False

public virtual void OnDeleted()

public virtual bool RayToLocalPosition(Ray ray, Vector2 position, float distance)

protected virtual void UpdateBounds(Sandbox.Rect rect)

Update the bounds for this panel. We purposely do nothing here because on world panels you can change the bounds by setting `Sandbox.UI.RootPanel.PanelBounds`.

protected virtual void UpdateScale(Sandbox.Rect screenSize)

We override this to prevent the scale automatically being set based on screen size changing.. because that's obviously not needed here.

Properties

Showing 7 properties

public float Sandbox.UI.WorldPanel.MaxInteractionDistance { get; set; }

Maximum distance at which a player can interact with this world panel.

public Vector3 Sandbox.UI.WorldPanel.Position { get; set; }

Position of the world panel in 3D space.

public Rotation Sandbox.UI.WorldPanel.Rotation { get; set; }

Rotation of the world panel in 3D space.

public static float Sandbox.UI.WorldPanel.ScreenToWorldScale { get; set; }

public Sandbox.ITagSet Sandbox.UI.WorldPanel.Tags { get; set; }

Tags that are applied to the underlying SceneObject

public Transform Sandbox.UI.WorldPanel.Transform { get; set; }

Transform of the world panel in 3D space.

public float Sandbox.UI.WorldPanel.WorldScale { get; set; }

Scale of the world panel in 3D space.

Metadata

FieldValue
NamespaceSandbox.UI
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.UI.WorldPanel

On this page