-
How to connect a shape layer to a wave shape using Math.sin()
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.