Vector3 Right { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Right property of the Rotation struct provides the right-hand direction vector of the current rotation. This vector is perpendicular to both the forward and up vectors of the rotation, effectively representing the local right direction in the rotated space.

Usage

Use the Right property to obtain the right-hand direction vector of a rotation. This can be useful for determining the local right direction in 3D space, which is often needed in graphics programming and game development for tasks such as aligning objects or calculating movement directions.

Example

// Example of using the Right property
Rotation rotation = Rotation.FromAxis(Vector3.Up, 90);
Vector3 rightDirection = rotation.Right;

// rightDirection now holds the vector pointing to the right of the rotation
// This can be used to move an object to the right relative to its current orientation