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 …
s&box ICameraSetup: Camera setup callbacks
ICameraSetup API Reference ICameraSetup is an interface for receiving callbacks during camera setup, allowing fine-grained control over camera effects before, d…
CameraNoiseSystem example: Camera effects
CameraNoiseSystem Example: Camera Effects CameraNoiseSystem is a GameObjectSystem that applies temporary camera effects (shake, noise, etc.) by implementing ICa…
s&box ICameraSetup: Camera render hooks
Interface for camera setup hooks that allow fine-grained control over camera effects. Implement to modify the camera at specific stages of the render pipeline. …
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…
s&box CameraNoiseSystem: Camera noise manager
GameObjectSystem that manages camera noise effects. Implements ICameraSetup to apply noise during camera rendering. Behavior Maintains a list of active BaseCame…
s&box GamePreferences: User preferences
GamePreferences Static Class GamePreferences is a static class that defines the local user's preferences for the game. These ConVars control player-specific set…
s&box CameraComponent: Screen/World Conversion, RenderToTexture, Priority, Viewport, and Oblique Projection
s&box CameraComponent: Screen/World Conversion, RenderToTexture, and Priority wraps a and provides the main rendering configuration for a s&box scene. Every sce…
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. …
Post-processing and camera setup — CameraComponent, PostProcessVolume, Bloom, DoF, and Film Grain
Post-Processing and Camera Setup CameraComponent Orthographic Camera Multiple Cameras (Priority) Higher priority renders on top. Use for split-screen, minimaps,…
VR Development
VR Development Build virtual reality experiences with OpenXR support, tracked devices, and VR-specific components. Setup Enable VR in your project settings. s&b…
Player Controller - s&box Scene Documentation
Player Controller The Player Controller component provides character movement for games. It handles physics-based movement, ground detection, jumping, and camer…
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…
PostProcessVolume: Camera-Based Effect Blending with Box, Sphere, and Infinite Modes
The component in s&box applies post-processing effects to cameras inside its volume. Effect components can be on the same GameObject or child GameObjects. Volum…
PlayerController: Built-in First/Third Person Controller with Physics, Input, and Camera
The PlayerController component is a first and third person player controller built into s&box. It is physics-based (a special RigidBody) with built-in input, ca…
Sandbox: CameraNoiseSystem — screen shake, punch, and recoil with ICameraSetup
CameraNoiseSystem — Screen Shake, Punch, and Recoil Effects is a that implements to apply camera noise effects (shake, punch, recoil) each frame. Effects are in…
SceneCamera: World-to-Screen, Screen-to-World, Render Hooks, and Camera Properties
SceneCamera: World-to-Screen, Screen-to-World, and Render Hooks is the main camera class in s&box. It wraps a native frustum and provides coordinate conversion,…
PlayerInventory Weapon Switching
PlayerInventory Weapon Switching Weapon switching with host authority and IPlayerEvents delegation. Key Features Sync'd ActiveWeapon with Change callback for ne…
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; …
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…