Vector3 AsVector3()

book_4_sparkGenerated
code_blocksInput

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 work with the Euler angles in a Vector3 format. This can be useful for operations that require vector arithmetic or when interfacing with APIs that expect a Vector3 input.

Example

// Example of using the 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)