ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

increasing/decreasing Z-position based on distance to a null

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
James Henry
increasing/decreasing Z-position based on distance to a null
on Jun 5, 2020 at 4:07:44 pm

Hi all, trying to build an automatically scaling carousel type effect.

I have a null object ('Center') and I'm basically scaling images underneath depending on their position to this null. Here's my expression so far:


sMax = thisComp.layer("Center").effect("Scale")("Slider");
r = thisComp.layer("Center").effect("Radius")("Slider");

a = thisComp.layer("Center").transform.position[0];
b=position[0];
l = length(Abbott);

s = ease(l, 0, r, sMax, 52);

[s,s]


r is a slider control that controls the radius of the null object, and sMax is the max scaling size of the image.

I was hoping I could add another variable f = ease(l, 0, r, -100, 100) and then simply end my code with [s,s,f] but this is having no effect...

I was also wondering if there was a way to parent multiple layers to one and have the position of these layers all animate together? When I do this it stops the code on the linked layers working.

Any help would be appreciated!

sMax = thisComp.layer("Center").effect("Scale")("Slider");
r = thisComp.layer("Center").effect("Radius")("Slider");

a = thisComp.layer("Center").transform.position[0];
b=position[0];
l = length(Abbott);

s = ease(l, 0, r, sMax, 52);

[s,s]


Return to posts index

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