Description
The AsVector3
method of the Angles
struct returns the Euler angles as a Vector3
object. In this representation, the x
component corresponds to the pitch, the y
component corresponds to the yaw, and the z
component corresponds to the roll.
Usage
Use the AsVector3
method when you need to convert an Angles
object to a Vector3
for operations that require vector arithmetic or when interfacing with APIs that expect a Vector3
representation of angles.
Example
// Example of using AsVector3 method
Angles angles = new Angles(30.0f, 45.0f, 60.0f);
Vector3 vectorRepresentation = angles.AsVector3();
// vectorRepresentation will be (30.0, 45.0, 60.0)