Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects reverse the movement direction of a bouncing object

  • reverse the movement direction of a bouncing object

    Posted by Nazanin Karimi on March 22, 2016 at 11:23 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

    Fredrik Åkerlund replied 10 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy