The FromPitch
method creates a Rotation
instance representing a rotation around the pitch axis. This is useful for creating rotations that only affect the pitch, which is the rotation around the X-axis in a 3D space.
The FromPitch
method creates a Rotation
instance representing a rotation around the pitch axis. This is useful for creating rotations that only affect the pitch, which is the rotation around the X-axis in a 3D space.
To use the FromPitch
method, call it with a single parameter specifying the pitch angle in degrees. The method returns a Rotation
object that can be used to apply this pitch rotation to objects in your scene.
// Example of using Rotation.FromPitch float pitchAngle = 45.0f; // 45 degrees pitch Rotation pitchRotation = Rotation.FromPitch(pitchAngle); // Use the pitchRotation to rotate an object GameObject myObject = new GameObject(); myObject.Transform.Rotation = pitchRotation;