Throw Expression in Adobe After Effects
The “Throw” expression is a time-saver in After Effects. It allows you to move something at a constant speed without keyframes.
To create the expression, set a keyframe for the position property of a layer. Then, create a variable for velocity and enter a value. This value is the pixels per second of your desired movement.
Can’t see this video? Click here!
velocity=500;
Then, create a variable for x and y (or z if a 3D layer). If you want to move something across the screen horizontally, such as a baseball, you will set x equal to its position (which is 0 in a position array) and alter it based on 3 other values. These are time, inPoint, and the velocity variable that was just set.
x = position[0]+(time-inPoint)*velocity;
Time always changes, which creates the movement. The reason inPoint is subtracted is that it allows the movement to happen from where you initially position the layer.
Any position variable that is unaffected by your desired throw animation can remain equal to itself. In this case, y isn’t affected, so we just return 1 in brackets, which is the y value in a position array.
y = position[1];
Then, return x and y in an array.
[x,y];
Similarly, you can add rotation by creating an expression for the rotation property. In this case, your velocity variable should be equal to the number of degrees per second of the desired rotation.
Then, create a variable for rotation and set it equal to rotation and add the same equation as we did in position. Then, return r.
velocity=180;
r = rotation + (time-inPoint)*velocity;
[r];
Enjoying the news? Sign up for the Creative COW Newsletter!
Sign up for the Creative COW newsletter and get weekly updates on industry news, forum highlights, jobs, inspirational tutorials, tips, burning questions, and more! Receive bulletins from the largest, longest-running community dedicated to supporting professionals working in film, video, and audio.
Enter your email address, and your first and last name below!
Responses