No calculator required. Just a little pickwhipping. Okay, one tiny bit of calculator. Again, this will simply keep Pin 2 the same distance from Pin 1 no matter where Pin 1 goes. For this example, we’ll make Pin 1 the pin you’re animating and Pin 2 the pin that’s following Pin 1.
At the start of your comp (or wherever the base “rest” pose is; before you’ve animated any pins), twirl down the Position property for both pins and calculate the difference in position in both X and Y. Simple addition/subtraction: if Pin 1 is [800,500] and Pin 2 is [700,700] your difference is -100X and +200Y. Then Opt/Alt=click the Position property for Pin 2 and type:
pupX=
Then pickwhip to the X parameter of Pin 1’s Position property, which should give you something similar to this:
pupX=effect(“Puppet”).arap.mesh(“Mesh 1”).deform(“Puppet Pin 1”).position[0];
You’ll need to add the semicolon to the end. This creates a variable called pupX and sets it to be equal to the X value of Pin 1’s Position at every frame. Do the same with the Y position and a second variable:
pupY=effect(“Puppet”).arap.mesh(“Mesh 1”).deform(“Puppet Pin 1”).position[1];
You now have two variables, each matching the value of one parameter of Pin 1’s Position. If you just set them as the position for Pin 2, Pin 2 would exactly match Pin 1 wherever it went:
[pupX,pupY]
this just says Pin 2 X position = pupX = Pin1 X position and Pin 2 Y position = pupY = Pin1 Y position
Now you just need to adjust those numbers by the difference you noted earlier:
[pupX-100, pupY+200]
this says the same thing but subtracts 100 from Pin 1’s X value and adds 200 to Pin 1’s Y value, then sets them as Pin 2’s X and Y value
So, final code:
pupX=effect(“Puppet”).arap.mesh(“Mesh 1”).deform(“Puppet Pin 1”).position[0];
pupY=effect(“Puppet”).arap.mesh(“Mesh 1”).deform(“Puppet Pin 1”).position[1];
[pupX-100, pupY+200]
Sadly you can’t just copy/paste this code as your layer names and value differences won’t be the same. I wasn’t aware you needed to move Pin 2 independently of Pin 1 at various times. I thought you just needed Pin 2 (3,4, etc.) to maintain relative difference to Pin 1 throughout its move. If you need variable on/off animation control, pretty sure that’s possible but will take someone smarter than me.
—
It is easier to destroy than to create.
More fun, too.