Vector3 Backward { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Backward property of the Transform struct provides a Vector3 representing the backward direction relative to the transform's current orientation. This is typically used in 3D space to determine the direction opposite to the forward direction of an object.

Usage

Use the Backward property when you need to calculate or apply transformations in the direction opposite to the object's forward direction. This can be useful for operations such as moving an object backward or determining the direction of a backward-facing ray.

Example

// Example of using the Backward property
Transform transform = new Transform();
Vector3 backwardDirection = transform.Backward;

// Use the backward direction to move an object
Vector3 newPosition = transform.Position + backwardDirection * -1.0f;
transform = transform.WithPosition(newPosition);