-
Reverse X and Y coordinates for puppet pin motion
Hey folks, I’m linking puppet pins to a track with motion tracking applied. The source track has mostly up and down motion, and I would like to use that vertical motion to drive a puppet pin horizontally. I’ve been searching for an expression to switch x and y…. with no luck. Optimally, a null would be linked to the source tracking data, and pins would be adjustable through the null anchor point, and X and Y would be reversed.
Both of these expressions work by themselves but I can’t hack them together. First one attaches source motion data–Second one reverses my x and y.
L = thisComp.layer("source");
M = L.motionTracker("Tracker 1")("Track Point 1");
fromWorld(L.toWorld(M.attachPoint*-1
) + M.attachPointOffset)L = thisComp.layer("Null_1");
x = (L.position-L.position.valueAtTime(L.inPoint))[1];
value + [x,0]