float z { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The z property represents the Z component of a Rotation in the s&box game engine. This component is part of the quaternion representation of the rotation, which includes the X, Y, Z, and W components. The Z component, along with the other components, defines the axis of rotation and the angle of rotation around that axis.

Usage

To access or modify the Z component of a Rotation object, you can use the z property. This property is a float and can be read or set directly.

Example

// Example of accessing and setting the Z component of a Rotation
Rotation rotation = new Rotation();
float currentZ = rotation.z; // Get the current Z component
rotation.z = 0.5f; // Set the Z component to 0.5