Rotation RotationToLocal( Rotation& worldRot )

robot_2Generated
code_blocksInput

Description

The RotationToLocal method of the Transform struct is used to convert a rotation from world space to local space. This is particularly useful when you need to understand how a global rotation affects an object in its local coordinate system.

Usage

To use the RotationToLocal method, you need to have a Transform instance and a Rotation object representing the world rotation you want to convert. The method will return a new Rotation object that represents the equivalent rotation in the local space of the Transform.

Example

// Assume 'transform' is an instance of Transform
// and 'worldRotation' is a Rotation object in world space
Rotation localRotation = transform.RotationToLocal(ref worldRotation);

// Now 'localRotation' contains the rotation in the local space of 'transform'