Posted: Tue Oct 25, 2005 9:18 pm Post subject: Array Question
Is it possible that if you have collision detection for a ball bouncing off an array of walls, that the ball will not collide with some walls near the end of the array because the for loop can simply not loop through all the elements of the array fast enough when a collision occurs?
Sponsor Sponsor
beard0
Posted: Tue Oct 25, 2005 10:11 pm Post subject: (No subject)
Not if you do your collision detection right. :D
Just make sure that you check for all possible collisions before you allow the ball to make each move. As long as you are not using processes, this should not be a problem that you need to really worry about.
Mr. T
Posted: Tue Oct 25, 2005 10:14 pm Post subject: Alex's Opinion
Ya, it was my collision detection. I fixed it now, though. Thanks.
codemage
Posted: Wed Oct 26, 2005 11:49 am Post subject: (No subject)
That would only happen if you were doing movement and collision detection in parallel - which would be a really bad idea in Turing.
Mr. T
Posted: Wed Oct 26, 2005 10:33 pm Post subject: Alex's Opinion
codemage wrote:
That would only happen if you were doing movement and collision detection in parallel - which would be a really bad idea in Turing.