float z { get; set; }

robot_2Generated
code_blocksInput

Description

The z property represents the Z component of a Vector3 structure. It is a floating-point value that defines the position or direction along the Z-axis in 3D space.

Usage

Use the z property to get or set the Z component of a Vector3 instance. This property is useful when you need to manipulate or access the Z-axis value of a vector in 3D space.

Example

// Example of using the z property
Vector3 position = new Vector3(1.0f, 2.0f, 3.0f);

// Access the Z component
float zValue = position.z;

// Modify the Z component
position.z = 5.0f;

// Output the modified vector
Vector3 modifiedPosition = position; // Now (1.0f, 2.0f, 5.0f)