Sandbox.Angles
Sandbox.Angles Euler angles (yaw, pitch, roll) representation. Overview Angles stores rotation as yaw, pitch, and roll in degrees — easier to work with than qua…
Sandbox.Rotation
Sandbox.Rotation Represents 3D orientation. Overview Rotation stores an orientation in 3D space, handling quaternion math internally. Creation Constants Applyin…
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…
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…
BulletConfiguration record struct
BulletConfiguration Record Struct Configuration for s&box bullet weapon behavior including damage, spread, and recoil. Properties Damage () - Base damage per bu…
Math types — Vector3, Rotation, Angles, Transform, TimeSince, and BBox
Math Types — Vector3, Rotation, Angles, and Transform s&box uses its own math types. Here's a practical reference for the ones you'll use constantly. Vector3 Ro…
s&box BallSocketPair: Hydraulic ball socket visual
BallSocketPair Component API Reference BallSocketPair is a Component that aligns two ball socket models towards each other and updates a line renderer between t…
s&box RollermineNpc: Physics-driven NPC
RollermineNpc Class API Reference RollermineNpc is a physics-driven NPC that chases players, leaps at them, and bounces off dealing damage on contact. Implement…
Playing Sounds: SoundHandle, GameObject.PlaySound, and Audio Components
s&box provides several ways to play sounds: fire-and-forget at a position, controlled via , attached to a , or via scene components. SoundEvent Assets Sounds ar…
PlayerController: Physics-Based Character with Events Interface
The component is a physics-based first/third person player controller. Add it to a scene and be running around with no programming required. Core Features Physi…
Playing Sounds
Playing Sounds in s&box s&box provides both 2D and 3D sound playback through code and components. Quick Sound Playback Sound Handle Store the handle to control …
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…
Math Types - s&box Documentation
Official s&box documentation for Math Types including Vector3, Rotation, Angles, and related types. Vector3 represents 3D positions and directions with X, Y, Z …
Input Handling Code Examples
Input Handling Code Examples Comprehensive input examples covering buttons, analog sticks, mouse, controller, and VR input. Default Input Actions
Math Types: Vector3, Rotation, Angles, and Transform
s&box provides several math types for 3D game development in the namespace. Vectors Vector2 — 2D (x, y) for screen/UI Vector3 — 3D (x, y, z) for world positions…
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…
Sandbox: BaseBulletWeapon — hitscan shooting with BulletConfiguration, recoil, and IronSightsWeapon
BaseBulletWeapon — Hitscan Shooting with Recoil and Camera Noise extends and implements hitscan bullet firing with configurable aim cone, recoil, and camera noi…
s&box Vector3.WithAimCone: Direction spread
Vector3.WithAimCone Extension Method The WithAimCone extension method adds random spread to a direction vector, useful for bullet spread, projectile dispersion,…
Sandbox.Random
Sandbox.Random Random number generation. Overview Random provides methods for generating random numbers, vectors, and making random selections. Basic Random Vec…
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…