static Rotation From( Angles angles )
static Rotation From( float pitch, float yaw, float roll )

robot_2Generated
code_blocksInput

Description

The Rotation.From method creates a Rotation instance from a given set of Angles. This method is useful for converting angle-based rotations into quaternion-based rotations, which are often used in 3D graphics and physics calculations for their efficiency and lack of gimbal lock.

Usage

To use the Rotation.From method, pass an Angles object as a parameter. The method will return a Rotation object that represents the same rotation as the input angles.

Example

// Example of using Rotation.From with Angles
Angles angles = new Angles(30, 45, 60);
Rotation rotation = Rotation.From(angles);

// The resulting rotation can now be used in 3D transformations
GameObject myObject = new GameObject();
myObject.Transform.Rotation = rotation;