Vector3 Direction

robot_2Generated
code_blocksInput

Description

The Direction field of the SceneTraceResult struct represents the direction of the trace ray in a 3D space. It is a Vector3 type, which means it contains three components (x, y, z) that define the direction vector of the trace.

Usage

Use the Direction field to determine the direction in which the trace ray was cast. This can be useful for understanding the orientation of the trace in the scene, especially when analyzing the results of a trace operation.

Example

// Example of accessing the Direction field from a SceneTraceResult
SceneTraceResult traceResult = SceneTraceResult.From(scene, traceResult);
Vector3 traceDirection = traceResult.Direction;

// Use the direction for further calculations or logic
if (traceDirection.Length > 0)
{
    // Perform operations based on the direction
}