Collision detection between 3+ objects...
So, I''ve got a bunch of balls bouncing around in a Quake map like Mexican Jumping beans. The only problem is that they bounce right through eachother. I can do collision checks between any 2 of them at a time, but how on Earth does one go about checking all of them?
Example:
Let''s say I''m going through all the balls one at a time updating them for the next frame.
My current ball is ball1.
I check ball1 against ball2. No collision. Fine.
I check ball1 against ball3. I get a collision, so I ricochet ball1.
Now I go to ball2. I check ball2 against ball3. I get a collision. Uh oh, suppose this collision knocks ball3 out of the course of ball1 so they never would have hit eachother?
So. What''s the deal? Anyone know how this is done?
If a man is talking in the forest, and there is no woman there to hear him, is he still wrong?
November 15, 2000 01:17 PM
You should probably calculate all collisions BEFORE altering courses. So you calculate all collisions and then can account for multiple collisions, adjust course and update positions.
Lather, rinse, repeat.
Lather, rinse, repeat.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement