Tuesday, August 29, 2017

Make an object or shadow follow/parent only on one axis after effects


Let's say you want the y axis to stay fixed but you wanted the object to translate along x with another layer or object. For instance the shadow for a bouncing character.

Start with code something like this in the position expression for your object that needs to track your "parent object" Set y to the desired fixed vertical height.

y = 900;
x=  ;
[x,y]

Simply Click to the left of the semi colon after x= then pick whip to the x position of the object you want it to follow.


The code should update to something like this.


y = 900;
x=thisComp.layer("name of your layer").transform.position[0];
[x,y]

Now it will follow along with your object only on one axis!