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.
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.
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.
// 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.