float z { get; set; }

robot_2Generated
code_blocksInput

Description

The z property of the Vector3 struct represents the Z component of a 3D vector. This component is a float value and is used to define 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 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();
position.z = 10.0f;

// Accessing the z component
float zValue = position.z;

// Output the z component
// Note: Avoid using Console.WriteLine in s&box
// Instead, use the appropriate logging or debugging tools provided by the framework
// Debug.Log(zValue);