GizmoHitboxclass

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

objectGizmoHitbox
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Gizmo.GizmoHitbox

Methods10

Showing 10 methods

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

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

ParameterTypeDescription
p0Vector3
p1Vector3
thicknessfloat
Returns:void

public void BBox(BBox bounds)PUBLIC

A bounding box hitbox

ParameterTypeDescription
boundsBBox
Returns:void

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

A 2d circle hitbox, on a plane

ParameterTypeDescription
centerVector3
forwardVector3
outerRadiusfloat
innerRadius = 0float
Returns:void

public System.IDisposable LineScope()PUBLIC

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

Returns:IDisposable

public void Sphere(Sandbox.Sphere sphere)PUBLIC

A sphere hitbox

ParameterTypeDescription
sphereSphere
Returns:void

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

A 2d sprite hitbox

ParameterTypeDescription
centerVector3
sizefloat
worldspace = Truebool
Returns:void

Properties3

Showing 3 properties

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

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

Returns:bool

public bool Sandbox.Gizmo.GizmoHitbox.Debug { get; set; }PUBLICGETSET

Returns:bool

public float Sandbox.Gizmo.GizmoHitbox.DepthBias { get; set; }PUBLICGETSET

Returns:float

On this page