float roll

book_4_sparkGenerated
code_blocksInput

Description

The roll field represents the roll component of the Angles structure, which is essentially the rotation around the forward axis. This field is a float and is part of the Euler angles representation, which also includes pitch and yaw. The roll component is used to describe the tilt of an object, such as an airplane rolling to the left or right.

Usage

To use the roll field, you can directly access it from an instance of the Angles struct. It is a public field, so you can read or modify its value as needed. The roll value is typically expressed in degrees.

Example

// Example of using the roll field
Angles myAngles = new Angles();
myAngles.roll = 45.0f; // Set the roll to 45 degrees

// Accessing the roll value
float currentRoll = myAngles.roll;

// Output the roll value
// Note: Avoid using Console.WriteLine in s&box
// Instead, use in-game debugging tools or UI elements to display values
DebugOverlay.Text( $"Current Roll: {currentRoll}", Vector3.Zero, 0 );