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…
s&box IPhysgunEvent: Physgun grab interception
IPhysgunEvent Interface API Reference IPhysgunEvent is an interface for Components that want to intercept physgun grab attempts. Implement to allow or reject ph…
Physgun Grab State with Permission Checks
Physgun Grab State Pattern Implementation pattern for physgun object grabbing with ownership checks and IPhysgunEvent permissions. Key Features Sync'd GrabState…
Component Event Interfaces for Tool Interactions
Component Event Interfaces (IPhysgunEvent, IToolgunEvent) Event interfaces that allow components to respond to tool interactions. These use s&box's pattern for …
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,…
Input Glyphs: Device-Adaptive Button Icons for UI Hints
Input glyphs in s&box provide an easy way to show users which buttons to press for actions. They automatically adjust for whatever device is being used and retu…
Sandbox: BaseCarryable — unified AimRay, WeaponModel resolution, and seat-aware damage
BaseCarryable — Unified Weapon Base with AimRay and Seat Support is the root class for all holdable items. It handles viewmodel/worldmodel management, a unified…
Sandbox: Full codebase architecture — systems, player components, weapons, tools, NPCs
Sandbox Codebase Architecture Overview The Facepunch Sandbox game is a large reference implementation. Here's a map of the major systems and how they connect. C…
Rigidbody Component: Networked Velocity, Proxy Physics Simulation, Impact Damage, and SmoothMove
Rigidbody Component: Networking, Velocity Sync, and Proxy Physics Simulation The component is the primary way to add physics simulation to a . It implements and…
Graphics.Draw, Blit, DrawText, DrawIcon, and GrabFrameTexture — Custom Rendering APIs
Graphics.Draw and Graphics.Blit: Custom Rendering in s&box provides low-level rendering APIs for drawing custom geometry, screen-space quads, and text. All call…