FORUMS: list search recent posts

reverse the movement direction of a bouncing object

COW Forums : Adobe After Effects

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

Hi,

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;
[x,y]

Thx
Naz


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]