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 direction vector into its corresponding Euler angles. This can be useful for tasks such as rotating objects in a 3D environment or converting between different orientation representations.
Example
// Example of accessing 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}");