robot_2Generated
code_blocksInput

Description

The RunAll method of the SceneTrace class executes a trace operation and records all the objects that are hit during the trace. This method returns an enumerable collection of SceneTraceResult objects, each representing a hit detected during the trace.

Usage

To use the RunAll method, first configure your SceneTrace object with the desired parameters, such as the start and end points, the shape of the trace, and any filters or conditions. Once configured, call RunAll to execute the trace and retrieve all hits.

Example

// Example of using SceneTrace.RunAll

// Create a SceneTrace object
SceneTrace trace = new SceneTrace();

// Configure the trace (e.g., set start and end points)
trace.FromTo(startPosition, endPosition);

// Run the trace and get all hits
IEnumerable<SceneTraceResult> results = trace.RunAll();

// Iterate through the results
foreach (var result in results)
{
    // Process each hit
    // For example, log the hit position
    Vector3 hitPosition = result.Position;
    // Do something with hitPosition
}