Computer Science Canada bouncing ball off of walls |
Author: | iop [ Wed May 19, 2004 7:08 pm ] |
Post subject: | bouncing ball off of walls |
I have a ball that starts out in the middle of the screen, drops down. From there, I need the ball to start bouncing around the whole screen. My problem is that the screen isnt the average Turing screen. I have mine edited to cover the whole area of the computer screen of the computer that my program is running on. I would love some help on how I could make the ball bounce around the whole screen. |
Author: | Delos [ Wed May 19, 2004 7:19 pm ] | ||
Post subject: | |||
http://www.compsci.ca/v2/viewtopic.php?t=75 Collision detection. Also: - you most likely will need to check for the ball's position. So...
|
Author: | PhOeNiX-47 [ Wed May 19, 2004 8:08 pm ] | ||
Post subject: | |||
Well, first of all ur ball needs to go in a direction using a variable. Make sure the if u hit a wall make the direction change Let me show you.
Hope that helps you... |