I am currently making a version of Pong with a little twist. Everything is going great so far, but if the ball is hit at a vertical/near vertical angle, it will continue to bounce between the two walls and pretty much stays there for the rest of the game. I have primarily made the game using built-in Physics materials, although the paddles and the walls are adding force to the ball when it collides with them(a feature of the game, to make it go faster). The ball has force applied to it at the start. I was wondering whether there would be anyway to prevent this "perfect bounce" scenario, and would be very grateful for any help.
Here are what the walls are doing (the opposite force for the bottom wall):
And here are what the paddles are doing (opposite force for opposing paddle):
Any help would be greatly appreciated.
How about making some sort of bounce counter, which is reset after it hits a paddle, and if it bounces against the wall n times, then a force is added which goes sideways? Sorry if I didn't explain that too well, if you need me to write out the code I will.
answered May 19 '11 at 09:11 AM