Multi-Body Collisions: Solving Complex Interactions

  • Thread starter Thread starter rorix_bw
  • Start date Start date
  • Tags Tags
    Collisions
AI Thread Summary
The discussion centers on the complexities of handling multi-body collisions in game physics. The original poster initially attempted to resolve collisions by breaking them into pairs but struggled with simultaneous impacts. It was clarified that for three objects colliding, one can sum their vectors to treat them as a single entity, but this approach lacks a definitive analytic solution due to the complexities involved. The conversation highlights that many games simplify these interactions by avoiding true simultaneous collisions, instead opting for sequential processing to maintain realism. Ultimately, achieving a balance between realistic physics and computational feasibility remains a significant challenge in game development.
rorix_bw
Messages
145
Reaction score
0
Looking at some old code I wrote for a game.

It has objects that collide, and rebound from each other. Where two collide, or one collided with a boundary, I knew how to work out the new trajectories and speeds.

In the case of multiple body collisions I had no clue. I broke them down randomly into pairs of 2 and just kept resolving until everything was moving again [EDIT: and nothing interpenetrated] :-)

How you actually do it for multi-body systems?
 
Physics news on Phys.org
You sum them.

If three objects collide simultaneously, you can add the vectors of two of them, and treat the result as a single object, involved in single collision. Then repeat the same process for the other two.

I just did a google on this and there seems to be a lot more about it on game developer forums.
 
deleted post, sec :) will edit.

krd said:
If three objects collide simultaneously, you can add the vectors of two of them, and treat the result as a single object, involved in single collision. Then repeat the same process for the other two.

EDIT: No, i still don't understand it.

Each = is 1 unit of velcoity. A and C contact B from opposite sides while B is staitonary.

A---->B<----C

Now doing (A+B)

A----> + B = <--A B-->

We treat that (A+B) as a single object with a combined velcoity ... which is zero as they cancel.

We collide C with it, we get this final result for C

C-->

And why is B moving?
 
Last edited:
With A and C striking B with equal and opposite momenta you can see they should rebound leaving B stationary.

In your case you ended up with B moving because you started out colliding A and B ... which, if C wasn't there, would have ended up moving to the right -->.
(I see your model has them with zero net momentum after the collision - which is broadly incorrect. You haven't conserved momentum. I'd have expected A to come to rest in a simple model.)

Anyway - the next step would intuitively have B collide with C ... following your rules, then B and C will now be moving in opposite directions. I think krd was expecting you to treat A+B as a single system in the second collision somehow.

However, the calculation will turn out differently depending on which pair you compute first. There is no analytic solution: google for "three body problem".

We usually do it numerically, or make some sort of approximation (or series of approximations).

In computer games you can get around it by deciding that you cannot get three objects colliding at the same time ... two will always hit before the third one does. There are lots of different approaches and, as krd observed, it is a big topic.
 
sacrasm mode on:

What kind of crap is "no analytic solution"? :-) From my notes I see that I spent ages puzzling over it in the dark days when you couldn't google anythng. I was expecting it be all done and dusted now, with physics games everywhere, but now I see that they ALL CHEAT!

Time to lock myself in away in seclusion until either I break the problem or it does me in! Nobel or funeral bell!

sarcasm mode off:

Maybe something in this post is not quite true. I'll have a look at ways of cheating it first. Thanks Simon.

edit: So does mean I can sue anyone selling "realistic billiards game"? :-)
 
Last edited:
but now I see that they ALL CHEAT!
That's what Charles Fort said :)

eg. the Solar System is a many-body system ... we solve it approximately and then work out the small effects using a perturbation method until what we get is close enough to what we measure to make good predictions. It works because of the scales involved - Jupiter does affect the Earth but the Sun is a much bigger influence.

Unfortunately "realistic" is not the same as "accurate model of reality". It just has to be good enough to fool you. Besides, I don't think you'd get much per person in the inevitable class action.

I've noticed there are situations in the "realistic" snooker and pool games where the balls jiggle around a lot more in small collisions that I experience IRL so I suspect some ordering of the interactions is happening.

It's hard to imagine a scale where you'd get two simultaneous collisions in real life though ... so, for a sufficiently short time step, sequencing the collisions probably makes sense.
 
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Hello everyone, Consider the problem in which a car is told to travel at 30 km/h for L kilometers and then at 60 km/h for another L kilometers. Next, you are asked to determine the average speed. My question is: although we know that the average speed in this case is the harmonic mean of the two speeds, is it also possible to state that the average speed over this 2L-kilometer stretch can be obtained as a weighted average of the two speeds? Best regards, DaTario
Some physics textbook writer told me that Newton's first law applies only on bodies that feel no interactions at all. He said that if a body is on rest or moves in constant velocity, there is no external force acting on it. But I have heard another form of the law that says the net force acting on a body must be zero. This means there is interactions involved after all. So which one is correct?
Back
Top