# Why do we iterate when applying sequential impulse?

This topic is 1042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Erin Catto, in his GDC slides, tells that we apply impulse at each contact point and terminate after fixed number of iteration or until impulse becomes small.

What does this mean? How does the case where one impulse for each contact point is not enough look like?

(It seems gdc 2006 videos are nowhere to be found, so I couldn't find his explanation on this, sorry)

Edited by ivanrei

##### Share on other sites

Anytime you have more than two coupled (touching) objects, or more than one contact point between them, the pairwise impulses are not guaranteed to produce a correct response. So, the algorithm iterates until an approximate solution is found to the multi-body contact problem.

##### Share on other sites

Anytime you have more than two coupled (touching) objects, or more than one contact point between them, the pairwise impulses are not guaranteed to produce a correct response. So, the algorithm iterates until an approximate solution is found to the multi-body contact problem.

Thanks for the reply @Aressera, I'll try to redo the math and see. can you explain more what you mean by "correct impulse"? (example of the incorrect impulse case, if you will)

I tried to only apply impulse once, I didn't see what's wrong, but I didn't take into account rotation

Edited by ivanrei

##### Share on other sites

(Disclaimer: the following is based on my own experience, not the paper you're referring to ... also I'm writing this during my lunch break so I've got to keep it short)

Consider a stack of bricks, initially at rest. At the beginning of your physics step, gravity gives all of these bricks a downward velocity.

If you evaluate the impulses only once, the only contact point with an "inward" relative velocity is the one between the bottom brick and the ground; you'll end up setting the bottom brick's velocity to zero to keep it from falling through the ground, but every brick above that still has a downward velocity.

If you iterate once more, the contact point between the bottom brick and the brick above it now requires an impulse (to keep them from going through each other). After applying this impulse, the result will be both the bottom and second-from-bottom bricks moving downward at 0.5x their previous velocity (the velocity they got from gravity), and every brick above that still moving downward at full.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 11
• 9
• 38
• 16
• ### Forum Statistics

• Total Topics
634128
• Total Posts
3015692
×