Sandbox.BBox
Sandbox.BBox Axis-aligned bounding box. Overview BBox represents an axis-aligned box in 3D space. Used for collision, bounds checking, and spatial queries. Crea…
Physics Tracing Code Examples
Physics Tracing Code Examples Raycast and shape trace examples using — the builder pattern for physics queries. TraceResult Properties Builder Pattern Methods
Playing Sounds: SoundEvent, SoundHandle, and GameObject Audio in s&box
s&box provides several ways to play sounds in code: fire-and-forget at a world position, control via SoundHandle, attach to a GameObject, or use scene component…
Sandbox: Hydraulic tool — motorized SliderJoint with LineRenderer shaft
Sandbox Hydraulic Tool — Motorized SliderJoint Constraints The Hydraulic tool creates a between two objects with a component that can extend and retract the joi…
s&box SoundHandle: Full Audio Playback Control API
s&box SoundHandle: Full Audio Playback Control API is returned by and gives full control over a playing sound. Playing Sounds SoundHandle Properties Stopping St…
Citizen Characters - s&box Assets Documentation
Citizen Characters The Citizen is s&box's default human character model. It provides a standardized base for player characters, NPCs, and customization through …
Sound.Play and SoundHandle: 3D Audio, Volume, Pitch, Occlusion, UI Sounds, and Dedicated Server Behavior
Sound.Play and SoundHandle: Audio Playback in s&box is the static entry point for audio playback. is the returned handle for controlling a playing sound. Playin…
s&box EnvironmentShake: Camera shake component
Component that creates camera shake effects based on distance and time curves. Implements ICameraSetup to apply rotation noise during PostSetup. Properties Prop…
Tracing - s&box Physics Documentation
Tracing Tracing (raycasting) is the primary way to query the physics world in s&box. It allows you to cast rays or shapes through the scene to find collisions w…
Sandbox: NPC system — Schedule, Task, and Layer architecture
NPC System — Schedule, Task, and Layer Architecture The Sandbox NPC system uses a layered architecture: Layers handle continuous behaviours (navigation, senses,…
s&box LineRenderer and TrailRenderer: Points, Spline Interpolation, Face Modes, Texture Scrolling, and DepthFeather
s&box LineRenderer and TrailRenderer: Procedural Line Rendering renders a line through a list of points with configurable width, color, and spline interpolation…
ToolMode SelectionPoint and Trace Helpers
ToolMode.SelectionPoint and Trace Helpers Helper methods and data structures for toolgun selection and placement. SelectionPoint Struct Trace Methods Placement …
Sandbox: Physgun — grab, freeze, launch, and pull mechanics
Physgun — Grab, Freeze, Launch, and Pull Mechanics The Physgun () is a that lets players grab, move, freeze, and launch physics objects. It uses a struct to tra…
VerletRope — rope physics with attachment, slack, and stiffness
VerletRope simulates rope physics using Verlet integration. The rope hangs from the GameObject's position and optionally attaches its end to another GameObject.…
s&box TVEntity: Camera feed display
TVEntity Component API Reference TVEntity is a TV screen entity that displays the feed from a linked CameraEntity. Use the Linker tool to connect a Camera to th…
Sandbox.Ray
Sandbox.Ray Infinite ray for intersection tests. Overview Ray represents an infinite line starting from a point and extending in a direction. Used for raycastin…
Camera and View Control
Working with cameras and player viewpoints in s&box. Main Camera Access Creating a Player Camera First-Person Camera Screen to World Ray World to Screen Camera …
ScreenPanel and WorldPanel: AutoScale Strategies, ZIndex, LookAtCamera, and Interaction Range
ScreenPanel and WorldPanel: UI Components in s&box Scenes ScreenPanel is the root component for 2D screen-space UI. It renders attached children to the screen. …
Player Event Interfaces (Local and Global)
Local.IPlayerEvents and Global.IPlayerEvents Event interfaces for player lifecycle, damage, inventory, and camera events. Local fires to player hierarchy only; …
Sandbox.Vector3
Sandbox.Vector3 3D vector for positions, directions, and offsets. Overview Vector3 is the primary type for 3D coordinates and directions in s&box. Creation Cons…