Converts the current Euler angles to a Rotation
object. The angles will be normalized during this conversion process.
Converts the current Euler angles to a Rotation
object. The angles will be normalized during this conversion process.
Use this method when you need to convert Euler angles, represented by the Angles
struct, into a Rotation
object. This is useful for scenarios where you need a rotation representation that avoids issues like gimbal lock and provides a more stable and consistent way to handle rotations in 3D space.
// Example of converting Angles to Rotation Angles angles = new Angles(30, 45, 60); Rotation rotation = angles.ToRotation(); // Use the rotation in a scene or with a GameObject GameObject myObject = new GameObject(); myObject.Rotation = rotation;