Re[2]: [ODE] Cylinder colisions

Pierre Terdiman p.terdiman at wanadoo.fr
Thu Oct 10 05:19:02 2002


Are your cylinders real cylinders or capsules ? I assume they're "real"
cylinders since you make a difference between them and "capped cylinders".
Then you might want to tell Eric Haines about it, for his intersection page.
Actually providing a free ODE-independent set of cylinder overlap routines
would be very very handy for a lot of people.

> They must not "explode out".  One reason it may happen is well known
> problem with integration of fast rotating body. Cylinders (as well as
> Capped Cylinders) must show this problem more often than other bodies
> especially when radius/length ratio is small. It happen because
> rotating around an axis with small inertia partly counts as rotating
> around an axis with large inertia. But it is not a problem of
> colliders.
> To resolve it finite rotation axes may be used or simply
> do not set inertia tensor with strongly different inertia of its axes.

I think it can be solved by :
- using a better integration scheme (RK4 at least)
- clamping angular velocity to a max speed

Unless I'm missing something.... I wouldn't tweak the inertia tensor, that's
a delicate beast.

Seems to work here: www.codercorner.com/Physics.zip
(Press 6 to create some bars, then w to make them spin quickly. I can't make
it explode here.)(and I hope we're talking about the same problem ;)

Pierre