[ODE] correctly using dContactGeom structur

Christoph Beyer boernerb at web.de
Sat Sep 30 14:52:18 MST 2006


Jon Watte (ODE) wrote:
>
>
> I disagree. The "normal" and "distance" are expressed in relation to a 
> specific geom; the "pos" should be similarly specific to one geom.
>
> Cheers,
>
>          / h+
>
But i think choosing the pos "in the middle" is the best way, because in
a collision, nobody can exactly say which geom is the most penetrating
object.
If a corner is penetrating the cylinder's nappe, you can also say, the
nappe is penetrating the corner and no geom should be the preferred.
To detect this, you should use the old positions and velocitys of the
geoms and then calculate which object is "more colliding", more moving
in the other object.
But this is not very easy and would slow down the collider, so it is
useless.

I think both bodys of the geoms are moved away from the contactpoint, so
the depth should be the half of the whole penetration.
I tested this with my incipiently cylinder/cylinder-collider and half
depth looks a little bit better.

Besides, the cylinder/cylinder-collider is very tricky...
Has anyone some ideas how to get the closest points of a circle/disc and
a line in 3d-space?
I'm running out of my school-mathematics ;-)


christoph





More information about the ODE mailing list