[ODE] problem with constantly moving geoms - body get stucked
Jules
deebool at wanadoo.fr
Wed Mar 12 11:27:57 2003
Hi everyone,
I've been working successfully with ODE for some times now and I've just
discovered a strange behavior.
I have a ball (geom + body) falling on a ccylinder (geom only).
Everything works fine if the cylinder don't move but if I call
SetPosition(...) on the ccylinder once in the loop (even with the same
coordinates each time),
the ball get stucked in the cylinder, bouncing madly around the center of
mass.
Of course it's stupid to call SetPosition(...) with the same coordinates
(was just to explain) but the problem is I need to move this geom almost
each frame and if I do so, even slightly, I get the same problem (and even
with a box instead of the ccylinder).
Note that I use the collision part and the physic part separately (I don't
use dGeomSetBody(), I update the geom manually instead). I use fixed time
step.
Here's my update loop pseudo code:
Loop()
{
CCylinderGeom->SetPosition(...);
ComputeContactPoints(...);
PhyWorld->Step(...);
m_JointGroup->Empty();
m_Ball->UpdateGeomFromBody();
}
Any ideas ?
Thanks,
Jules