Description
The pitch
field represents the pitch component of an Angles
structure, which is typically used to denote the up/down rotation in Euler angles. This field is a float
and is publicly accessible, allowing you to directly get or set the pitch value of an Angles
instance.
Usage
Use the pitch
field to manipulate the up/down rotation of an object represented by Angles
. This is useful in scenarios where you need to adjust the vertical orientation of an object, such as tilting a camera or adjusting the elevation of a character's view.
Example
// Example of setting the pitch value
Angles angles = new Angles();
angles.pitch = 45.0f; // Set pitch to 45 degrees
// Example of getting the pitch value
float currentPitch = angles.pitch;
// Use the pitch value in a method
if (currentPitch > 30.0f)
{
// Perform some action if the pitch is greater than 30 degrees
}