-
Position A = 0%, Position B = 100%
Hello!
I’m wondering if there’s any way, with expressions, to set something’s position based on a percent.
Here’s an example pseudo code for what I’m looking for :
Position 0% = 0,0;
Position 100% = 100,100;
The reason is that I am creating a rig for an eye. I want the eye to open and close (using square solids to block the eye), but I also want to be able to change the “line” where the eye is 100% closed. This way I can have the eyes look closed, bored, sleepy, scared, excited, etc. I can’t just use a single null to control the eyelids, as the bottom eyelid and the top eyelid would “enter frame” at different times if the “100% closed” position wasn’t located directly in the center. I would want them both to start from the bottom/top at the same time, regardless of where the “100% closed” line is.Essentially, the pseudo code of the expression I need looks something like this. I would put this on the top and bottom eyelids, but with varied starting positions:
Position 0% = 50,-50;
Position 100% = thisComp.layer("center").transform.position;
I would then use a slider to control the percentage completion, so I could control blinking with keyframes.Something else to note – if at all possible, I don’t want to use any extra precomps.
Thanks!