float Distance { get; set; }

robot_2Generated
code_blocksInput

Description

The Distance property of the SceneTraceResult struct represents the distance between the start and end positions of a trace operation within a scene. This property is read-only and provides a float value indicating the length of the trace path.

Usage

Use the Distance property to determine how far a trace operation has traveled from its starting point to its endpoint. This can be useful for calculating the length of a path or for determining if a trace has reached a certain distance threshold.

Example

// Example of using the Distance property
SceneTraceResult traceResult = SceneTraceResult.From(scene, trace);
float traceDistance = traceResult.Distance;

// Check if the trace distance is greater than a certain value
if (traceDistance > 10.0f)
{
    // Perform some action based on the distance
    // e.g., log the distance or trigger an event
}