| **Bouncing ball effect**
by Tom Croucher on Oct 6, 2014 at 12:36:40 pm |

Heya,

I'm trying to get my image of a football to bounce in AE.

I'm using this expression:

----------------------------------------------------

Position:

---

bounceSpeed=1;

flight=0.85;

bounceHeight=250;

t=Math.abs((time*2*bounceSpeed)%2-1);

t=linear(t,flight,0,0,1);

b=Math.cos(t*Math.PI/2);

value - [0,bounceHeight*b];

---

Scale:

---

bounceSpeed=1;

squash=0.5;

stretch=1.2;

flight=0.85;

t=Math.abs((time*2*bounceSpeed)%2-1);

t= (t>flight) ? easeOut(t,flight,1,stretch,squash) : easeIn(t,0,flight,1,stretch);

[value[0]/Math.sqrt(t),value[1]*t];

---------------------------------------

This works but the ball is squishing before it hits the floor.

Can anyone help or provide a better expression?

Cheers,

Tom.