-
Converting rotation orders – X>Y>Z to Y>X>Z
This is a follow up to this thread…
https://forums.creativecow.net/thread/227/17971
… I thought I’d start a new one as I’ve managed to isolate the problem to a rotation order issue.Basically I am looking for a function that could convert the rotation order of X>Y>Z to Y>X>Z.
I tried to workaround this be creating a parented structure to force a Y>X>Z order but unfortunately this caused massive problems with other parts of the composition.
I have been struggling through this problem for ages and I am close to losing my mind. If anyone could help I would be so grateful, especially as I am beginning to get quite a bit of pressure from the client now.
I guess I am looking for an expression that looks something like this:
//
camL = thisComp.layer(“Camera 1”);x1 = camL.xRotation;
y1 = camL.yRotation;
z1 = camL.zRotation;rot1 = [x1, y1, z1];
convertXYZtoYXZ(rot1);
function convertXYZtoYXZ(r1) {
// clever maths code here
return([pan, tilt, roll]);
}
//Many thanks,
JamieJimJam•Graphics
https://www.jimjamgraphics.com/