Description
The Up
property of the Rotation
struct provides the upwards direction vector of the current rotation. This is useful for determining the orientation of an object in 3D space, particularly when you need to know which direction is considered "up" relative to the object's current rotation.
Usage
To access the Up
property, you need an instance of the Rotation
struct. This property is read-only and returns a Vector3
representing the upwards direction.
Example
// Example of using the Up property
Rotation rotation = Rotation.From(45, 30, 0);
Vector3 upDirection = rotation.Up;
// upDirection now contains the upwards direction vector of the rotation.