reverse the movement direction of a bouncing object
by nazanin karimi 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;