ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Start and stop parenting at specific time

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Naoko Hara
Start and stop parenting at specific time
on May 17, 2018 at 12:15:34 pm

I have an ellipse (Moon) orbiting another ellipse (Sun) and I want the moon to stop parenting at either a specific time or at a layer marker.
I found the below expression, but struggling to make it work.

Is there another time based one, or a layer marker based one? Help??

Thanks,

pickuptime = 1.15;
dropofftime = 2;
layertofollow = thisComp.layer("hook_angle.ai");
ticker = Math.min(Math.max(pickuptime, time), dropofftime);
thisComp.layer("hook_angle.ai").transform.position.value_at_time(ticker)


Return to posts index

Sam Catt
Re: Start and stop parenting at specific time
on May 17, 2018 at 12:27:44 pm

whats happening when you use that one currently?


Return to posts index

Dan Ebberts
Re: Start and stop parenting at specific time
on May 17, 2018 at 5:58:37 pm

It's hard to tell exactly, but you might be looking for something like this:


pickuptime = 1.15;
dropofftime = 2;
layertofollow = thisComp.layer("hook_angle.ai");
if (time < pickuptime)
value
else if (time < dropofftime)
value + layertofollow.position - layertofollow.position.valueAtTime(pickuptime)
else
value + layertofollow.position.valueAtTime(dropofftime) - layertofollow.position.valueAtTime(pickuptime)


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]