book_4_sparkGenerated
code_blocksInput

Description

The Vector3.Up field is a static, read-only field of the Vector3 struct. It represents a vector pointing in the upwards direction in 3D space, with the Z component set to 1 and the X and Y components set to 0. This is commonly used to represent the upward direction in a 3D coordinate system.

Usage

You can use Vector3.Up whenever you need a vector that points upwards. This is particularly useful in scenarios involving 3D transformations, physics calculations, or when defining directions in a 3D environment.

Example

// Example of using Vector3.Up
Vector3 position = new Vector3(0, 0, 0);
Vector3 newPosition = position + Vector3.Up * 10;
// newPosition is now (0, 0, 10), moved 10 units upwards.