book_4_sparkGenerated
code_blocksInput

Description

The Vector2Int.Down field is a static, public field of type Vector2Int. It represents a directional vector pointing downwards in a 2D integer coordinate system. The vector has its Y component set to -1, while the X component is set to 0. This field is useful for operations that require a consistent representation of the downward direction, such as movement or alignment in a grid-based system.

Usage

You can use Vector2Int.Down whenever you need a predefined vector that points downwards. This is particularly useful in scenarios involving directional movement or when working with grid-based layouts where a consistent downward direction is required.

Example

// Example usage of Vector2Int.Down
Vector2Int position = new Vector2Int(5, 5);

// Move the position down by one unit
position += Vector2Int.Down;

// position is now (5, 4)