Description
The x
property represents the X component of a Rotation
object. This component is part of the quaternion representation of the rotation, which includes the X, Y, Z, and W components. The X component, along with the other components, defines the axis of rotation and the angle of rotation around that axis.
Usage
To access or modify the X component of a Rotation
object, you can use the x
property. This property is a float
and can be read or set directly.
Example
// Example of accessing and setting the x component of a Rotation
Rotation rotation = new Rotation();
// Access the x component
float xComponent = rotation.x;
// Set the x component
rotation.x = 0.5f;