Moving a SceneObject with Transform in s&box
Use to move a SceneObject each frame in s&box. This moves the object forward at 100 units per second. Prefer over direct manipulation of the SceneObject for net…
NavMeshLink custom traversal — parabolic jump, ladder climb, and physics jump
NavMeshLink Custom Traversal connects two NavMesh points for agents to traverse (jumps, ladders, teleports). Default traversal linearly interpolates between sta…
ControlSystem Pattern for Seat/Vehicle Control
ControlSystem - Seat/Vehicle Control Management A that manages control transfer between players and seated entities (vehicles, chairs). Handles input routing an…
IPlayerControllable example: ThrusterEntity
IPlayerControllable Example: ThrusterEntity ThrusterEntity demonstrates how to implement IPlayerControllable for a thruster that responds to player input while …
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 …
NavMesh Links: Custom Jump and Ladder Traversal for AI Agents
NavMesh Links connect disconnected NavMesh regions (jumps, ladders, teleports). By default agents linearly interpolate between endpoints, but you can implement …
Inventory Hotbar UI Component
Inventory HUD with Hotbar A Razor PanelComponent that displays player inventory slots as a hotbar with mouse wheel and number key support. Implementation Key Fe…
EnvmapProbe — local reflection captures with Static, Dynamic, and OnDemand modes
EnvmapProbe — Reflection Captures in s&box is a built-in s&box component that captures a cubemap at its world position for local specular reflections. The engin…
Working with Models and Rendering
Guide to displaying 3D models in s&box. ModelRenderer Component Loading Models SkinnedMeshRenderer (Animated Models) Dynamic Model Creation LODs (Level of Detai…
Multiplayer and Networking
Complete guide to multiplayer setup in s&box. Creating a Lobby Joining a Lobby Spawning Networked Players Host/Client Checks Connection Events Networked Object …
Scene lighting setup — DirectionalLight, PointLight, SpotLight, SkyBox, AmbientLight, and Fog
Scene Lighting Setup s&box lighting is built from components. A typical scene needs a directional light (sun), ambient light, and a skybox. Directional Light (S…
Nameplate Component with Voice Activity
Nameplate with Voice Activity A Razor component that displays player nameplates above characters with voice chat visualization. Implementation SCSS Example Key …
Chat UI Pattern with RPC Broadcasting
Chat UI with RPC Broadcasting A Razor UI component for game chat that handles local input, RPC broadcasting, Steam filtering, and automatic message expiration. …
DynamiteEntity Explosive Entity Pattern
DynamiteEntity - Simple Explosive Entity A simple explosive entity that can be triggered via damage or player input. Demonstrates , , and prefab cloning pattern…
BaseWeapon and BaseCarryable Weapon Framework
BaseWeapon and BaseCarryable - Weapon Framework Base classes for creating weapons in s&box. Provides ammo management, view/world models, and input handling. Bas…
PlayerInventory Weapon Switching
PlayerInventory Weapon Switching Weapon switching with host authority and IPlayerEvents delegation. Key Features Sync'd ActiveWeapon with Change callback for ne…
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…
Sandbox: LimitsSystem — server-side per-player spawn and tool limits via ConVars
LimitsSystem — Server-Side Spawn and Tool Limits is a that enforces configurable per-player limits on props, constraints, and tool entities. It listens to and .…
WebSockets
Use WebSockets for real-time communication with external servers. Basic Setup With Auth Token Common Use Cases Custom networking — External matchmaking, chat se…
Sandbox: Duplicator tool — copy, paste, and save contraptions with DuplicationData
Duplicator Tool — Copy, Paste, and Save Contraptions The Duplicator tool copies a contraption (a connected graph of GameObjects) to JSON and pastes it back. It …