motion graphics eXchange

Object bouncing on a floor

Thumbnail for: Object bouncing on a floor
This will make your layer/object bounce along an imaginary 'floor'. Paste it into the 'position' attribute for your layer.
After Effects 6

Views: 6771
visit |  share this  error? 
Vy0 = 500; //initial y velocity (pixels/second)
Vx0 = 100; // initial x velocity (pixels/second)
g = 2500; // gravity (pixels/second/second)
floor = 400;
e = .85; //elasticity
b = floor - position[1];
h = b + Vy0*Vy0/(2*g);
T = Vy0/g + Math.sqrt(2*h/g);
if ((time-inPoint) < T){
 y = Vy0*(time-inPoint) - g*(time-inPoint)*(time-inPoint)/2 + b;
 Vy = -(Vy0 - g*T);
 while (true){
   Vy *= e;
   t = T;
   T += 2*Vy/g;
   if ((time-inPoint) < T){
     t = (time-inPoint) - t;
     y = Vy*t - g*t*t/2;
   }else if (T - t < thisComp.frameDuration){
     y = 0;
[position[0] + Vx0*(time-inPoint), floor - y]

(Min. Version: After Effects 6, Category: Design/Objects, Type: Expressions)
posted by MicGyver on Sep 15, 2008


Related topics:

Folding Template

Thumbnail for: Folding Template
folding and unfolding template free to use.
Require After Effects CS6
After Effects CS6
Projects (aep)

Views: 40224
posted by fsimoni on Nov 05, 2012

Product, Service or App Promotion

Thumbnail for: Product, Service or App Promotion
After Effects Template. Promote your app, product or service
After Effects CS5
Useful things
Projects (aep)

Views: 19468
posted by RedSpikeFx on Oct 30, 2012

Clean Logo V2

Thumbnail for: Clean Logo V2
After Effects CS4,CS5,CS5.5 and CS6 template logo reveal
After Effects CS4
Projects (aep)

Views: 23994
posted by aedaddy on Aug 19, 2012



follow us on in touch on facebook



Full length video training series presented by motion graphics industry professionals. Click here to visit Motionworks website!