-
ping pong
Hi guys,
I am trying to make a animation based on the old ping-pong game. I want to use an expression that sent the cube up and down.
The cube moves from left to right, back to the left and again to the right but at that point it doesn’t remember it is supposed to bounce back again.
Anyone know some solutions?
sp = 500;
xPos = time *sp;if (xPos >thisComp.width){
xPos = time * -sp+(thisComp.width*2);}if (xPos <(thisComp.width-thisComp.width)){ xPos = time * sp-+(thisComp.width*2);} [xPos,0]