Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

How to start my bouncing effect at specific time?

$
0
0

I try to build an expression preset for bouncing effect. Here is my code:

 

timeIn = effect("Start Time")("Slider");

In = timeIn.value;

 

timeOut = effect("End Time")("Slider");

Out = timeOut.value

 

freq = effect("Freq")("Slider");

F = freq.value;

 

Osc = effect("Lama&Tinggi Pentalan")("Slider");

Osi = Osc.value;

 

Amp = effect("Nilai Pembagi Landai")("Slider");

A = Amp.value;

 

Tinggi = effect("Besarnya Pentalan")("Slider");

T = Tinggi.value;

 

if (time >= In && time <= Out){

Y = T*(Math.abs(Math.cos(F*time*2*Math.PI))*Math.exp(-time/Osi*A));

position - [0, Y];

}else{

position - [0, 0];

}

 

It's works. My problem is that I got different bouncing result depend on the start time with the biggest bouncing at 0 second and going smaller when I put bigger value on it. It look's like just showing the expression result starting from the start time. How to manage my code so the sinus wave can start on the start time? Thanks for helping and sorry for my bad English as it's not my mother language


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>