Get the Time at a specific Value
- August 15, 2022
- 1 reply
- 921 views
Hello!
I've been wracking my brain trying to find a solution to this problem I'm having.
I have an animation where a null follows a path and "picks up" objects along the path. I want to be able to keyfram the null animation along the path at specific points, but still have the objects get picked up at the right time along the path and ease between the 2 positions.
I've done it somewhat by using the progress value then adding on a delay to that value, but the problem I'm running into is that if I put a keyframe into the progress slider while the transition between the positions is happening, the animation of the "pick up" stops. I'd like the "collecting" animation to continue regardless if the progress slider stops.
Here's what I have so far:
a = transform.position;
b = thisComp.layer("Trace Shape Layer 1: Path 1 [1.1]").transform.position;//null position
s = effect("Start Point")("Slider");//start point where null passes shape
progress = thisComp.layer("Trace Shape Layer 1: Path 1 [1.1]").effect("Trace Path")("Progress"); //progress of null along path
c = ease(progress, s, s+20, a, b);
I want to know if there's a way to get the time at a specific value of the slider, i.e. "when the progress slider = 10 give me the static value at that time" then use that time to trigger the animation. Something like:
a = transform.position;
b = thisComp.layer("Trace Shape Layer 1: Path 1 [1.1]").transform.position;//null position
s = effect("Start Point")("Slider");//start point where null passes shape
progress = thisComp.layer("Trace Shape Layer 1: Path 1 [1.1]").effect("Trace Path")("Progress"); //progress of null along path
begin = *time at the value of slider s*;
delay = 3;
c = ease(time, begin, begin +delay, a, b);
