public sealed struct Ray
A struct describing an origin and direction
Related Guides
Broader workflow and conceptual references connected to this API.
There are various interfaces that can be given to components for specific purposes.
ScreenSpace::Trace provides functionality for tracing rays in screen space to compute effects like Dynamic Reflections or any kind of ray in world space. It leverages hierarchical ray marching for efficient performance.
Scenes can be traced against using Scene.Trace - which uses a builder pattern to make construction a bit easier. At a minimum, traces have a shape, start, and end. You can also filter which specific tags will be hit or ignored, or opt-in to using your project's collision rule matrix by calling WithCollisionRules(tag).
S&box includes a full 3D and 2D physics system powered by the Source 2 engine, with great performance and stability. Rigidbodies, colliders, joints, raycasting, and trigger volumes are all usable through Components on GameObjects.
Constructors
Showing 1 constructors
No results match this filter.
Methods
Showing 3 methods
No results match this filter.
Properties
Showing 2 properties
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | global |
| Type | class |
| Assembly | Sandbox.System |
| Doc ID | T:Ray |