Rotation RotationToWorld( Rotation& localRotation )

book_4_sparkGenerated
code_blocksInput

Description

The RotationToWorld method of the Transform struct converts a local rotation to a world rotation. This is useful when you need to transform a rotation defined in local space to the corresponding rotation in world space.

Usage

To use the RotationToWorld method, you need to have a Transform instance. You can then call this method by passing a reference to a Rotation object that represents the local rotation you want to convert. The method will return a new Rotation object representing the world rotation.

Example

// Assume 'transform' is an instance of Transform
Rotation localRotation = new Rotation(0, 90, 0); // Example local rotation
Rotation worldRotation = transform.RotationToWorld(ref localRotation);

// 'worldRotation' now contains the rotation in world space.