Vector3 Backward { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Backward property of the Rotation struct provides the backwards direction vector of the current rotation. This is useful for determining the direction opposite to the forward direction of an object in 3D space.

Usage

To access the backwards direction of a rotation, use the Backward property on an instance of the Rotation struct. This property returns a Vector3 representing the backwards direction.

Example

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

// Use the backwardDirection for calculations or transformations
// For example, moving an object backwards
Vector3 position = new Vector3(0, 0, 0);
position -= backwardDirection * 5; // Move 5 units backwards