

Google bouncing balls game plus#
What I did here is to measure the TOTAL ENERGY of ball as the potential energy BEFORE it reaches the limit plus the kinect energy of the ball BEFORE it reaches the limit. red ball jumping game, a free game app from top games available on google play store. function ballUpdate(elapsed)īall.dy = Math.sqrt( -2 * acceleration * ( ball.y - ball.dy ) + ball.dy * ball.dy ) Ĭopy and paste. Are you ready to bounce and kick the buddy red ball through walls.

In order to do that, you must use the potential energy + kinect energy concept here (Google for it if you wanna know the details of the equation).īasically this is what you want. You have to consider the exact speed of the ball when it really touches the limit. you don't need that if(ball.y > 0)īecause of the adjustment ball.y = 0 when the ball touchs the limit (the floor), invert the speed is not enough. What you gotta do is to add the speed (dx,dy) to your (x,y) on every iteration. Googles Privacy Policy sets out how we handle your data. Download Rotomania 3D: Bouncing Balls game & start jumping through most.

The first obvious error is that you are trying to multiply the speed by the elapsed time. By using this site, you agree to the Google Terms of Service. of top apps like Rotomania 3D: Bouncing Ball ga on google-play Store.
