Hi,

I am lost with how to calculate the rotation relative to a transform.

While InverseTransformPoint works well to calculate a position relative to a transform, how do achieve the same process but for rotation?

in short:

I would like to know modelB rotation relative to modelA transform.

I tried InverseTransformDirection but it doesn't seem to work for me. How could I then express a rotation as a direction and vice-versa?

EDIT: let me rephrase: how do I compute manually the localRotation value when the model is actually not parented? That is, what is the localrotation of modelB as if it was parented to modelA? I am not trying to modify the actual localrotation of modelB, I just need to know it to inject it in the rotationTarget of a joint.

thanks for your help,

Jean