[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 580: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 636: sizeof(): Parameter must be an array or an object that implements Countable
Brads Electronic Projects Forum • Ball direction on the super pong table
Page 1 of 1

Ball direction on the super pong table

Posted: Tue May 17, 2011 6:59 am
by bitfogav
Hey Brad,

just have some questions with the direction of the balls on the pong table?

Am i right in saying that some of the ball directions (angles) seem random, in other words if a ball hits a wall it bounces of at the same angle in the opposite direction, but if the ball hits a paddle the ball bounces off at a different angle than when it hit the paddle ?

Re: Ball direction on the super pong table

Posted: Wed May 18, 2011 6:14 am
by brad
I was going to make it random as they came out from the center of the screen and I was also going to make the balls deflect at different angles depending on where they hit the bat (but I didn't get around to it)

Instead, I have just set each ball to move at a set speed and at a set angle (because there are five of them, it looks random)

Making it truly random would be much better.