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 that is defined in the local space of an object to the global world space.

Usage

To use the RotationToWorld method, you need to have a Transform instance. Call the method with a Rotation parameter that represents the local rotation you want to convert. The method will return a Rotation that represents the equivalent rotation in world space.

Example

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

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