The Direction
field of the SceneTraceResult
struct represents the direction vector of the trace ray. This vector indicates the direction in which the trace was performed within the scene.
The Direction
field of the SceneTraceResult
struct represents the direction vector of the trace ray. This vector indicates the direction in which the trace was performed within the scene.
Use the Direction
field to determine the orientation of the trace ray. This can be useful for understanding the trajectory of the trace and for calculating reflections or other directional-based logic in your scene.
// Example of accessing the Direction field from a SceneTraceResult SceneTraceResult traceResult = SceneTraceResult.From(scene, ref physicsTraceResult); Vector3 traceDirection = traceResult.Direction; // Use the direction for further calculations Vector3 reflectionDirection = Vector3.Reflect(traceDirection, traceResult.Normal);