[ODE] Framerate problem *again*

skjold@cistron.nl skjold at cistron.nl
Tue Feb 11 16:45:02 2003


> collision to be detected two or more times per bouncing!
> 
> Why does this happen?

Of course, a collision can take multiple frames to bounce off, but I don't know why you first get a frame with collision, then one without, and then again with. The only reason I can think of is if this recurring collision is due to the gravity (or simulation error).


> 
> Ah... I call dSpaceCollide() every 20 msec, not every frame nor
> before every dWorldStep(). Maybe this could be a problem... ???

I have tried that too, doing multiple dWorldSteps between dSpaceCollide, but somehow I found it only added inaccuracies. Are you keeping the contact joints during each of the in-between dWorldSteps, or do you clear them immediately after the first one? This will most likely make an important difference, but I don't really know if it might add or remove accuracy in the end. I changed back to doing one dWorldStep per dSpaceCollide, and decided to wait for ODE-pluggable higher-order solvers :)