public sealed struct Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result
Related Guides
Broader workflow and conceptual references connected to this API.
Attributes are the bridge to pass information around the CPU to the GPU, like Variables, Textures or entire Buffers.
If you are using HTTP requests or WebSockets in your game, you can use Auth Tokens to validate that the requests were sent from a valid Steam user in a s&box game session. This is useful if you want to tie data to a specific Steam account, or prevent botting.
Just like Subgraphs, you can also create your own custom Nodes with C# (and shader code) to be used in Shader Graphs.
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.
The Storage system provides a simple, unified way to manage user-generated content in your game. Whether you're saving game progress, storing player creations, or anything else, Storage handles everything from local file management to Steam Workshop integration.
Subgraphs are a collection of Shader Graph nodes that can be easily reused as a single node across other Shaders and even other Subgraphs. This is an easy way of develop custom Shader Graph Functions of your own.
Properties
Showing 13 properties
public float Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.Distance { get; set; }
The distance between start and end positions.
public Vector3 Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.EndPosition { get; set; }
The end or hit position of the trace
public float Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.Fraction { get; set; }
A fraction [0..1] of where the trace hit between the start and the original end positions
public bool Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.Hit { get; set; }
public Vector3 Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.HitPosition { get; set; }
The hit position of the trace
public int Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.HitTriangle { get; set; }
public Vector2 Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.HitTriangleUv { get; set; }
This is the Uv coordinate on the triangle hit. 'x' represents the distance between Vertex 0-1, 'y' represents the distance between Vertex 0-2.
public Sandbox.Material Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.Material { get; set; }
public Vector3 Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.Normal { get; set; }
The hit surface normal (direction vector)
public Sandbox.SceneObject Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.SceneObject { get; set; }
If we hit something associated with a sceneobject, this will be that object.
public Vector3 Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.StartPosition { get; set; }
The start position of the trace
public Transform Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.Transform { get; set; }
The transform of the hit object (if it has one)
public Vector3 Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result.VertexInfluence { get; set; }
Given the position on the triangle hit, this vector gives the influence of each vertex on that position. So for example, if the Vector is [1,0,0] that means that the hit point is right on vertex 0. If it's [0.33, 0.33, 0.33] then it's right in the middle of each vertex.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | global |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result |