The pitch
field represents the pitch component of an Angles
structure, which typically corresponds to the up/down rotation in a 3D space. It is a public instance field of type System.Single
(float).
The pitch
field represents the pitch component of an Angles
structure, which typically corresponds to the up/down rotation in a 3D space. It is a public instance field of type System.Single
(float).
Use the pitch
field to directly access or modify the pitch component of an Angles
instance. This field is useful when you need to adjust or retrieve the up/down rotation angle of an object in a 3D environment.
// Example of using the pitch field Angles angles = new Angles(); angles.pitch = 45.0f; // Set the pitch to 45 degrees // Accessing the pitch value float currentPitch = angles.pitch; // Using pitch in a method angles = angles.WithPitch(30.0f); // Set pitch to 30 degrees using WithPitch method