float y { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The y property of the Rotation struct represents the Y component of the quaternion rotation. This component is part of the vector (x, y, z) that defines the axis of rotation in 3D space.

Usage

Use the y property to access or modify the Y component of a Rotation instance. This is useful when you need to directly manipulate the quaternion's axis of rotation.

Example

// Example of accessing and modifying the Y component of a Rotation
Rotation rotation = new Rotation();
float currentY = rotation.y; // Access the Y component
rotation.y = 0.5f; // Modify the Y component

// Use the modified rotation in a scene
Scene.Current.Add(new GameObject { Rotation = rotation });