SceneTrace Rotated( Rotation& rotation )

book_4_sparkGenerated
code_blocksInput

Description

The Rotated method in the SceneTrace struct is used to configure a trace to account for rotation. This is particularly useful when you need to trace rotated shapes such as boxes and capsules. By applying a rotation, the trace can accurately simulate the path and interaction of these shapes in a 3D space.

Usage

To use the Rotated method, you need to pass a reference to a Rotation object. This rotation will be applied to the trace, allowing it to account for the orientation of the shape being traced.

Example

// Example of using the Rotated method
Rotation rotation = new Rotation(0, 90, 0); // Define a rotation
SceneTrace trace = new SceneTrace();
trace = trace.Rotated(ref rotation);

// Now you can use the trace with the applied rotation
SceneTraceResult result = trace.Run();