-
Error with gravity expression
I am using CS3 and have applied an expression for bounce to a graphic. I have received the following error
After Effect warning: Timeout while waiting for the engine.
Expression disabledError occured at line 16.
Comp: RxTV
Layer: 1 (YELLOW_DOT.psd)
Property: PositionThe Expression I applied is as follows
Vy0 = 500; //initial y velocity (pixels/second)
Vx0 = 300; // initial x velocity (pixels/second)
g = 2500; // gravity (pixels/second/second)
floor = 400;
e = .85; //elasticityb = floor – position[1];
h = b + Vy0*Vy0/(2*g);
T = Vy0/g + Math.sqrt(2*h/g);if (time < T){ y = Vy0*time - g*time*time/2 + b; }else{ Vy = -(Vy0 - g*T); while (true){ Vy *= e; t = T; T += 2*Vy/g; if (time < T){ t = time - t; y = Vy*t - g*t*t/2; break; }else if (T - t < thisComp.frameDuration){ y = 0; break; } } } [position[0] + Vx0*time, floor - y] Any help fixing my problem or passing me a gravity with floor expression that works with CS3 would be much appreciated. Thank You