s&box docs

public sealed class Sandbox.Gizmo.GizmoHitbox

Contains functions to add objects to the immediate mode Scene. This is an instantiable class so it's possible to add extensions.

Methods

Showing 10 methods

public void AddPotentialLine(Vector3 p0, Vector3 p1, float thickness)

If we're in a hitbox linescope we'll distance this test vs the current ray. If not, we'll return immediately. This is automatically called when rendering lines

public void BBox(BBox bounds)

A bounding box hitbox

public void Circle(Vector3 center, Vector3 forward, float outerRadius, float innerRadius = 0)

A 2d circle hitbox, on a plane

Parameters

  • innerRadius: Default: 0

public System.IDisposable LineScope()

Start a line scope. Any drawn lines should become a hitbox during this scope.

public void Sprite(Vector3 center, float size, bool worldspace = True)

A 2d sprite hitbox

Parameters

  • worldspace: Default: True

Properties

Showing 3 properties

public bool Sandbox.Gizmo.GizmoHitbox.CanInteract { get; set; }

Whether or not drawn gizmos can be interacted with. Only affects gizmos in the current scope.

Metadata

FieldValue
Namespaceglobal
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Gizmo.GizmoHitbox

On this page