Copy link to clipboard
Copied
Hello I am trying to create a basic butterfly wing animation (top down. And I just want to add an expression to make the left wing rotate in the opposite direction. and the shadows to basically do the same.
I am currently using the following expression. And it's not working. Does anyone have any suggestions?
thisComp.layer("Right Wing").transform.yRotation;
//value *= -1;
Copy link to clipboard
Copied
Subtract the rotation of the master wing from the rotation value of the other wing. Put the animated wing layer above the second wing, and this expression will do it.
ref = thisComp.layer(index - 1).rotation;
value - ref
Or you could put the name of the animated wing in the first line like this: ref = thisComp.layer("Right Wing").rotation;
Copy link to clipboard
Copied
Thanks so much for the post. Maybe I am doing it wrong, but I am not able to get it to work. I tried both ways. But unsuccessful.
Copy link to clipboard
Copied
When you apply the expression to a 3D layer, you need to make the ref the specific value for that layer. You are using Y, so the expression should be this:
ref = thisComp.layer(index - 1).transform.yRotation;
value - ref
That should fix the problem. If the right wing is above the left, the expression subtracts the Y rotation value from the left Wing layer's Y rotation.
Copy link to clipboard
Copied
Got it! Thank you so much! It's working! Really appreciate it!