Quaternions local/world

Hi there,

I need to save a rotation relative to a specific transform in one place, and then convert that rotation relative to world space in another place. I’m not sure how to do that with quaternions.

If it was a position I would do this:

rightHandPostion = transform.InverseTransformPoint(rightHandJoint.position);

and then this:

transform.TransformPoint(rightHandPostion)

How would I handle this with a rotation?

Your words and your example don’t match, so I’m not sure what you want to do. The example code transform from world to local and then back to world. If you are trying to get the relative rotation with respect to a parent, you can use Transform.localRotation. If you are talking about an arbitrary transform, you can use Quaternion.FromToRotation() of the Transform.forward of two transforms to get the relative rotation.