ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

child moves half the rate of parent

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Robert Paynter
child moves half the rate of parent
on Sep 18, 2009 at 7:45:34 pm

how do you get a child to move half the speed of a parent?


Return to posts index

Dave LaRonde
Re: child moves half the rate of parent
on Sep 18, 2009 at 7:51:31 pm

Okay, some basics: Speed=Time X Distance. So when you say "half the speed" what do you actually want?

Do you want the child layer to move half as far in the same amount of time as the parent?
Or do you want the child layer to take twice as much time to move the same distance as the parent?

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Robert Paynter
Re: child moves half the rate of parent
on Sep 18, 2009 at 7:56:55 pm

I want the child layer to move half as far in the same amount of time as the parent


Return to posts index


Dave LaRonde
Re: child moves half the rate of parent
on Sep 18, 2009 at 9:40:43 pm

Hmmm.... I've been trying to figure out how to do it with an expression, but I'm drawing a blank. You may have to resort to keyframes.

Perhaps someone with greater expression knowledge than me will chime in.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Bob Root
Re: child moves half the rate of parent
on Sep 19, 2009 at 1:31:10 am

Hi Robert,

Hopefully this is what you are looking for... and hopefully I can explain it so it makes some sense. This explanation is a bit wordy, but no worries....in the end it's four pretty simple steps.

Open the position properties on your parent and child layer. If you've already set position keyframes for the parent layer, move your timeline slider to the first position keyframe. Things will be alot easier for you if your initial parent position values are divisible by two.

First, you'll need to create an expression in the position properties of the child layer.

[Option] or [Alt] click on the position stopwatch in your child layer (you'll should now see an area to enter to enter your expression in the timeline area).

The first expression you'll enter will be for the initial x,y position coordinates. You'll want to type the same position values that your parent layer has. Your expression should look like this [x,y]. Use your parent position numbers for the x and y values.

Keeping your expression window open type the + key and then picwip your child position to the parent position.

Your expression should now look like this...

[x,y]+thisComp.layer("Blue Solid 1").transform.position

"Blue Solid" is just the name of my layer I'm using in this example. You should see the name of your parent layer instead of that.

Remember that the x and y values are the coordinates you copied from your parent layer position.

Now enter *.5 at the end of your expression.

Your expression should now look like this...

[x,y]+thisComp.layer("Blue Solid 1").transform.position*.5

You'll notice that your child layer has hopped around a bit by this point, Depending on your initial coordinates, it may not be visible within your comp.

Change your expressions x and y values to 50% of the original values you entered. For example, if your original setting in your expression were [600,400] , you should re-enter them as [300,200].

This will place your child layer at the same coordinates as the parent.

Depending on where you want to place your child layer in the initial relation to the parent, you'll need to offset the [x,y] values in the expression.

That's should do it.

Try dragging your x and y values in the parent to see how things work for you.

Let me know if this works for you or if something doesn't make sense. It's pretty simple, but there are probably a dozen ways to get tricked up in it.

Bob















Return to posts index

Matt Gerard
Re: child moves half the rate of parent
on Jan 5, 2015 at 8:38:41 pm

Bob, just found this wonderful explanation and expression that is working perfectly for me. Thanks for the excellent explanation and knowledge. Even from back in 2009, this just made my life a lot easier!

Regards-

Matt

Its more fun to ride a slow motorcycle fast than a fast motorcycle slow...


Return to posts index

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