book_4_sparkGenerated
code_blocksInput

Description

The Vector3Int.Up field is a static, read-only field of the Vector3Int struct. It represents a unit vector pointing in the up direction, with the Z component set to 1 and the X and Y components set to 0. This is commonly used in 3D space to denote the upward direction relative to an object's local coordinate system.

Usage

You can use Vector3Int.Up whenever you need a reference to the up direction in integer vector space. This is particularly useful in scenarios involving grid-based calculations or when working with integer-based 3D coordinates.

Example

// Example usage of Vector3Int.Up
Vector3Int position = new Vector3Int(0, 0, 0);
Vector3Int newPosition = position + Vector3Int.Up;
// newPosition is now (0, 0, 1)