Api GizmoHitbox
class

GizmoHitbox

public sealed class GizmoHitbox

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

Properties

Name Type Description
CanInteract Boolean Whether or not drawn gizmos can be interacted with. Only affects gizmos in the current scope.
Debug Boolean
DepthBias Single

Methods

Void TrySetHovered(Single distance)

If this distance is closer than our previous best, this path will become the hovered path

Void TrySetHovered(Vector3 position)

If this distance is closer than our previous best, this path will become the hovered path

Void Sphere(Sphere sphere)

A sphere hitbox

Void BBox(BBox bounds)

A bounding box hitbox

Void Circle(Vector3 center, Vector3 forward, Single outerRadius, Single innerRadius = 0)

A 2d circle hitbox, on a plane

Void Model(Model model)

A model hitbox

Void Sprite(Vector3 center, Single size, Boolean worldspace = True)

A 2d sprite hitbox

Void Model(Model model, Single maxDistance = 10000)
IDisposable LineScope()

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

Void AddPotentialLine(Vector3 p0, Vector3 p1, Single 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

Assembly: Sandbox.Engine Declaring Type: Gizmo Full Name: Sandbox.Gizmo.GizmoHitbox