ryanlowe0

12-13-2002, 04:53 PM

i realize this is a common problem, but while ive seen many posts on the subject, no one seems to be addressing the major problem as i see it.

detecting collision is no sweat. even the physics of the balls bouncing off one another isnt so bad ( found a great explanation www.plasmaphysics.org.uk/print/collision.htm )

the real problem is that the balls are never exactly twice the radius apart (they overlap). this makes for some unnatural effects like the balls jiggling together a few times before separating. to stop this, i tried preventing two balls that have just collided with colliding again for a while. unfortunately, there remains some lingering weirdness, like sling-shoting.

i think the elastic collision has to be calculated at the point mid-frame when the balls are exactly 2r apart, but i dont know how to do this with 2 objects moving at arbitrary velocities.

does anyone have a definitive solution for just this part of ball collision?

thanks

detecting collision is no sweat. even the physics of the balls bouncing off one another isnt so bad ( found a great explanation www.plasmaphysics.org.uk/print/collision.htm )

the real problem is that the balls are never exactly twice the radius apart (they overlap). this makes for some unnatural effects like the balls jiggling together a few times before separating. to stop this, i tried preventing two balls that have just collided with colliding again for a while. unfortunately, there remains some lingering weirdness, like sling-shoting.

i think the elastic collision has to be calculated at the point mid-frame when the balls are exactly 2r apart, but i dont know how to do this with 2 objects moving at arbitrary velocities.

does anyone have a definitive solution for just this part of ball collision?

thanks