s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News
jams
Workshop
Steam
open_in_newSteam Workshop
Assets
view_in_arModels textureMaterials apparelClothing
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
Get s&box
Sign in with Steam
Api
Classes
GizmoHitbox
chevron_left Classes
class
GizmoHitbox

Properties

data_objectCanInteractdata_objectDebugdata_objectDepthBiasdata_objectRay

Methods

functionsAddPotentialLinefunctionsBBoxfunctionsCirclefunctionsLineScopefunctionsModelfunctionsSpherefunctionsSpritefunctionsTrySetHovered
GizmoHitbox
Contains functions to add objects to the immediate mode Scene. This is an instantiable class so it's possible to add extensions.
class Sandbox.Gizmo .
sealedSandbox.Engine

data_object Properties 4

CanInteract
bool
Whether or not drawn gizmos can be interacted with. Only affects gizmos in the current scope.
Debug
bool
DepthBias
float
Ray
Ray

functions Methods 8

AddPotentialLine (p0, p1, 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
BBox (bounds)
A bounding box hitbox
Circle (center, forward, outerRadius, innerRadius)
A 2d circle hitbox, on a plane
LineScope ()
IDisposable
Start a line scope. Any drawn lines should become a hitbox during this scope.
Model (model)
A model hitbox
Sphere (sphere)
A sphere hitbox
Sprite (center, size, worldspace)
A 2d sprite hitbox
TrySetHovered (distance)
If this distance is closer than our previous best, this path will become the hovered path
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter