static Rotation FromRoll( float roll )

robot_2Generated
code_blocksInput

Description

The FromRoll method creates a Rotation instance representing a rotation around the roll axis by a specified angle in degrees. This method is useful when you need to create a rotation that only affects the roll component, leaving pitch and yaw unchanged.

Usage

To use the FromRoll method, call it with a single parameter specifying the roll angle in degrees. The method returns a Rotation object that can be used in various transformations or combined with other rotations.

Example

// Create a rotation with a roll of 45 degrees
Rotation rollRotation = Rotation.FromRoll(45.0f);

// Use the rollRotation in a scene or apply it to a game object
GameObject myObject = new GameObject();
myObject.Transform.Rotation = rollRotation;