[ODE] Pushing through collisions

Alen Ladavac alenl-ml at croteam.com
Thu Apr 29 15:27:38 MST 2004


>     Possibly not! The small sphere will be stuck in the center of
>     large cylinder when its center is deep inside: i.e sphere's center
>     is between cylinder high-base and low-base. In this case, your
>     code assumes that it's a side penetration, but it's actually a
>     very deep bottom penetration.

But, it is the correct solution by definition. Contact normal and depth
define shortest direction and distance along which the two objects need to
be moved in order not to penetrate. If you push sphere deep enough in the
bottom of a cylinder, so that its center is further from the bottom, than
from the side of the cylinder - then the side is closer, and separation
normal goes that way. Generally, if center of one object is inside another
object, you are possibly already in trouble. Though you can calculate
correct resolution for that for primitives, you can't do that for generic
meshes, so you should avoid such cases in general.

>     For the case sphere center is on the cylinder axis, I didn't
>     notice it. I had successful made a large stable stack of cylinders and
>     spheres. And I'm sure all sphere center is in cylinders axis.

Yes, but if in that case the center of sphere was pushed deep inside, it
would NAN it.

>     I'm very very interested in another iterative solvers but
>     I'll finish porting Croteam's cylinder-vs anything to ODE before
>     reading more about it. Before, I had tried but without any
>     success :( . So please keep your iterative solver progress
>     updated. :)

Will do. :)

Cheers,
Alen



More information about the ODE mailing list