ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

reverse the movement direction of a bouncing object

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
nazanin karimireverse the movement direction of a bouncing object
by on Mar 22, 2016 at 11:11:36 pm


I am using the following expression for an object that moves left-to-right while bouncing. What I want is to have a right-to-left direction. Changing the position doesn't help. What should be changed here then?

veloc = 30 ; //horizontal velocity (pixels per second)
amp = 1 ; //sine wave amplitude (pixels)
freq = 4; //oscillations per second

y = amp*time*Math.sin(freq*time*2*Math.PI) + thisComp.height/2;
x = time*veloc;


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved