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 simulate the effects of rotation on the traced shape.
Example
// Example of using the Rotated method
Rotation rotation = new Rotation(0, 90, 0); // Rotate 90 degrees around the Y-axis
SceneTrace trace = new SceneTrace();
trace = trace.Rotated(ref rotation);
// Now you can use the trace with the applied rotation
SceneTraceResult result = trace.Run();