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…
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…
Sandbox.Transform - Position, Rotation and Scale
Sandbox.Transform Position, rotation, and scale combined. Overview Transform combines position, rotation, and scale into a single matrix for efficient calculati…
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 SnapGrid: World-space snap grid overlay
SnapGrid: World-Space Snap Grid Overlay SnapGrid is a sealed class that manages a world-space snap grid overlay projected onto a surface plane. It is used by th…
s&box Vector3 extension for aim cone randomization
s&box Vector3 Extension for Aim Cone Randomization This example shows extension methods for adding random spread to Vector3 direction vectors using s&box's Game…
s&box WheelOverlay: Direction arrow overlay
WheelOverlay Static Class WheelOverlay is an internal static class that draws a spinning direction arrow overlay on wheel faces. Used by the Wheel tool to visua…
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.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…
Sync Properties - Complete Networking Guide
Sync Properties Sync Attribute Adding the attribute to a property on a Component will have its latest value sent to other players each time it changes. These pr…
Sandbox.Random
Sandbox.Random Random number generation. Overview Random provides methods for generating random numbers, vectors, and making random selections. Basic Random Vec…
Input Handling Code Examples
Input Handling Code Examples Comprehensive input examples covering buttons, analog sticks, mouse, controller, and VR input. Default Input Actions
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,…
Collider types — Box, Sphere, Capsule, Model, Hull, Plane, and Trigger volumes
Collider Types s&box provides several collider components for physics shapes. All colliders can be set as triggers (no physical response, just overlap detection…
SceneTraceResult: All Fields and Properties from Trace Hits
is returned by and contains all information about a trace hit. Key Fields Common Usage Pattern
Sandbox.Rotation
Sandbox.Rotation Represents 3D orientation. Overview Rotation stores an orientation in 3D space, handling quaternion math internally. Creation Constants Applyin…
[Sync] Attribute: SyncFlags.FromHost, SyncFlags.Interpolate, SyncFlags.Query — How Property Sync Works
[Sync] Attribute: SyncFlags and How Property Synchronization Works The attribute marks a component property for automatic network synchronization from the owner…
GameObject - s&box Documentation
GameObject A GameObject is the fundamental building block of scenes in s&box. GameObjects have a transform (position, rotation, scale), can have parents and chi…
Scene.Trace: Raycasting, Shape Sweeps, Tag Filters, SceneTraceResult Fields, and FindInPhysics
Scene.Trace: Raycasting and Shape Sweeps in s&box is the entry point for all physics traces in s&box. It returns a builder that uses a fluent API. Basic Usage F…
s&box SoundDefinition: Categorized sound GameResource
SoundDefinition GameResource API Reference SoundDefinition is a GameResource that defines a categorized sound for use on spawned entities (thrusters, hoverballs…