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 direction in which a trace was conducted. This can be useful for understanding the orientation of the trace relative to the scene or for debugging purposes.
// 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 or logic if (traceDirection.Length > 0) { // Perform operations based on the direction }