float y { get; set; }

robot_2Generated
code_blocksInput

Description

The y property represents the Y component of a Rotation in the Sandbox game engine. This component is part of the quaternion representation of the rotation, which is used to define the orientation of objects in 3D space.

Usage

Use the y property to access or modify the Y component of a Rotation instance. This can be useful when you need to directly manipulate the quaternion values for advanced rotation calculations or when interfacing with systems that require quaternion inputs.

Example

// Example of accessing the Y component of a Rotation
Rotation rotation = Rotation.From(30.0f, 45.0f, 60.0f);
float yComponent = rotation.y;

// Example of setting the Y component of a Rotation
rotation.y = 90.0f;