I think I kicked Box2D in the family jewels

I believe what I am really doing is approaching my problem in the wrong way which is causing Box2D to behave the way it was designed... and (almost) fail.

In a nutshell, what I'm doing is outside of the World->Step I (sometimes) explicitly move some static geometry on and off "stage". "Stage" in this context means a play area where dynamic objects are contained within static geometry (it's a pinball table). It's really simple collision geometry, basically at some point during gameplay I place a large circle shaped body explicitly in a certain location by calling body->SetPosition. The problem is that space might be contained by dynamic objects. At this point it looks like things "freeze" up for a few seconds (sometimes shorter sometimes longer) while they get resolved? by Box2D.

I believe I've tracked it down to the following code:
http://box2d.svn.sourceforge.net/viewvc ... iew=markup.
Code:
457       if (iter == k_maxIterations)
  458       {
  459          break;
  460       }



Here an of ideas I had on solving this:

- Before placing the static geometry there, I could move the dynamic objects out of the way. I'm not sure if this is a good way to fix it.

Is there a right way to do this?
You can disable continuous collision or try using the latest SVN version at Google.
Erin Catto wrote:
You can disable continuous collision or try using the latest SVN version at Google.


Thanks for the response Erin. I have continuous collision disabled, that isn't the issue then. I think I'll take some time this weekend to port over the the latest trunk in Google code.

BTW, I just want to thank you for making a great Physics SDK and for continuing to develop and maintain it! I know from experience this isn't an easy task and often goes under appreciated. Well, I appreciate it.

Original thread: https://box2d.org/forum/viewtopic.php?t=4570