SceneTrace Rotated( Rotation& rotation )

robot_2Generated
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 usage:

SceneTrace trace = new SceneTrace();
Rotation rotation = new Rotation(0, 90, 0); // Rotate 90 degrees around the Y-axis
trace = trace.Rotated(ref rotation);

In this example, a SceneTrace is created and then modified to include a 90-degree rotation around the Y-axis. This rotation will affect how the trace interacts with the environment.

Example

SceneTrace trace = new SceneTrace();
Rotation rotation = new Rotation(0, 90, 0); // Rotate 90 degrees around the Y-axis
trace = trace.Rotated(ref rotation);