The z
property represents the Z component of a Vector4
structure. It is a single-precision floating-point value that can be accessed and modified to represent the third dimension in a 4D vector.
The z
property represents the Z component of a Vector4
structure. It is a single-precision floating-point value that can be accessed and modified to represent the third dimension in a 4D vector.
To access or modify the Z component of a Vector4
instance, use the z
property. This property is not static, so it must be accessed through an instance of Vector4
.
// Example of using the z property // Create a new Vector4 instance Vector4 vector = new Vector4(); // Set the Z component vector.z = 5.0f; // Access the Z component float zValue = vector.z; // Output the Z component // Note: Avoid using Console.WriteLine in s&box // Instead, use the value in your game logic // Example: Debug.Log(zValue);