Api Result
struct

Result

public sealed struct Result

Properties

Name Type Description
Hit Boolean
Distance Single The distance between start and end positions.
StartPosition Vector3 The start position of the trace
EndPosition Vector3 The end or hit position of the trace
HitPosition Vector3 The hit position of the trace
Fraction Single A fraction [0..1] of where the trace hit between the start and the original end positions
Normal Vector3 The hit surface normal (direction vector)
HitTriangle Int32
Material Material
Transform Transform The transform of the hit object (if it has one)
SceneObject SceneObject If we hit something associated with a sceneobject, this will be that object.
HitTriangleUv Vector2 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.
VertexInfluence Vector3 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.

Fields

Name Type Description
Vertex0 VertexDetail
Vertex1 VertexDetail
Vertex2 VertexDetail
Assembly: Sandbox.Engine Declaring Type: MeshTraceRequest Full Name: Sandbox.Engine.Utility.RayTrace.MeshTraceRequest.Result