Skip to content

Instantly share code, notes, and snippets.

@ryanbru0803
Last active January 22, 2017 16:10
Show Gist options
  • Select an option

  • Save ryanbru0803/bf530d119ee0324fa2a665af92e6045b to your computer and use it in GitHub Desktop.

Select an option

Save ryanbru0803/bf530d119ee0324fa2a665af92e6045b to your computer and use it in GitHub Desktop.
In After Effects, add this code to the position property to ease an object right, left, up, or down.
//Right
x = position[0];
y = position[1];
d = 262; //Distance in pixels
ease(time, 3, 4, [x , y], [x+d , y]);
//Left
x = position[0];
y = position[1];
d = 262;
ease(time, 3, 4, [x , y], [x-d , y]);
//Down
x = position[0];
y = position[1];
d = 262;
ease(time, 3, 4, [x , y], [x , y+d]);
//Up
x = position[0];
y = position[1];
d = 262;
ease(time, 3, 4, [x , y], [x , y-d]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment