PhysicsTraceBuilder Rotated( Rotation& rotation )

robot_2Generated
code_blocksInput

Description

The Rotated method of the PhysicsTraceBuilder class allows you to specify a rotation for the trace. This method modifies the trace to consider the specified rotation when performing physics calculations.

Usage

To use the Rotated method, you need to pass a reference to a Rotation object. This method is typically used in a chain of method calls on a PhysicsTraceBuilder instance to configure the trace before executing it.

Example

// Example of using the Rotated method
PhysicsTraceBuilder traceBuilder = new PhysicsTraceBuilder();
Rotation rotation = new Rotation(0, 90, 0); // Example rotation
traceBuilder.Rotated(ref rotation);

// Continue configuring the trace
traceBuilder.FromTo(ref startPosition, ref endPosition);

// Run the trace
PhysicsTraceResult result = traceBuilder.Run();

// Process the result
if (result.Hit)
{
    // Handle the hit
}