Description
The EulerAngles
property of a Vector3
instance provides the Euler angles representation of the direction vector. Euler angles are a way of representing the orientation of an object in 3D space using three angles, typically referred to as pitch, yaw, and roll.
Usage
Use the EulerAngles
property to convert a Vector3
direction vector into its corresponding Euler angles. This can be useful for operations that require orientation in terms of angles, such as rotations or transformations in 3D space.
Example
// Example of using the EulerAngles property
Vector3 direction = new Vector3(1, 0, 0);
Angles eulerAngles = direction.EulerAngles;
// Output the Euler angles
Console.WriteLine($"Pitch: {eulerAngles.pitch}, Yaw: {eulerAngles.yaw}, Roll: {eulerAngles.roll}");