Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to connect a shape layer to a wave shape using Math.sin()

  • How to connect a shape layer to a wave shape using Math.sin()

    Posted by Eduardo Asta on August 29, 2021 at 4:33 pm

    Hello,

    The ball (green) keeps the same X position all times, at the center of the comp, but its Y position goes up and down. At the same time, the wave shape layer (red) is moving from right to left (X position). It should looks like as the ball is always in the comp’s center, going up and dawn along the waves, and the red shape layer is moving from right to left.

    I was using the following expression at ball’s Y position, but it’s very hard to connect the ball’s amplitude and frequency to the wave’s X and Y displacement.

    a = 118;//amplitude

    f = .5;//frequency

    t = time – inPoint;

    value + Math.sin(t*2*Math.PI*f)*a;

    There is anybody who knows how to do that?

    Thanks.

    Eduardo Asta replied 4 years, 7 months ago 2 Members · 5 Replies
  • 5 Replies

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