Description
The Vector3Int.OneX
field is a static, public field of type Vector3Int
. It represents an integer vector where the X component is set to 1, while the Y and Z components are set to 0. This field is useful for operations that require a unit vector along the X-axis in integer space.
Usage
You can use Vector3Int.OneX
whenever you need a vector that points in the positive X direction with a magnitude of 1. This is particularly useful in grid-based systems or when performing operations that require a directional vector along the X-axis.
Example
// Example usage of Vector3Int.OneX
Vector3Int direction = Vector3Int.OneX;
// This will output: (1, 0, 0)
Vector3Int result = direction * 5; // Result will be (5, 0, 0)