API Referenceglobal
GizmoHitboxclass
Contains functions to add objects to the immediate mode Scene. This is an instantiable class so it's possible to add extensions.
object→GizmoHitbox
Methods10
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
| Parameter | Type | Description |
|---|---|---|
| p0 | Vector3 | — |
| p1 | Vector3 | — |
| thickness | float | — |
Returns:
void—public void Circle(Vector3 center, Vector3 forward, float outerRadius, float innerRadius = 0)
A 2d circle hitbox, on a plane
| Parameter | Type | Description |
|---|---|---|
| center | Vector3 | — |
| forward | Vector3 | — |
| outerRadius | float | — |
| innerRadius = 0 | float | — |
Returns:
void—public System.IDisposable LineScope()
Start a line scope. Any drawn lines should become a hitbox during this scope.
Returns:
IDisposable—public void Sphere(Sandbox.Sphere sphere)
A sphere hitbox
| Parameter | Type | Description |
|---|---|---|
| sphere | Sphere | — |
Returns:
void—public void Sprite(Vector3 center, float size, bool worldspace = True)
A 2d sprite hitbox
| Parameter | Type | Description |
|---|---|---|
| center | Vector3 | — |
| size | float | — |
| worldspace = True | bool | — |
Returns:
void—No results match this filter.
Properties3
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.
Returns:
bool—public bool Sandbox.Gizmo.GizmoHitbox.Debug { get; set; }
Returns:
bool—public float Sandbox.Gizmo.GizmoHitbox.DepthBias { get; set; }
Returns:
float—No results match this filter.