[ODE] box-box collisions

slipch slipch <slipch at gsc-game.kiev.ua>
Fri Oct 25 09:20:02 2002


Hello Peter,

Friday, October 25, 2002, 11:33:00 AM, you wrote:

PA> -----BEGIN PGP SIGNED MESSAGE-----
PA> Hash: SHA1

PA> Okay, so I've spent a little time looking at the box-box collision code.
PA> Detecting face-face contacts seems fairly easy; we just need to compare
PA> the normal vector between the boxes centers in the collision with the
PA> normal vector of the normal vectors of the sides of the penatrating box.
PA> In other words, determine if they share a coplanar face.  Then we need to
PA> generate contact points (I haven't quite figured this part out yet).

PA> I have a few questions.  The first is that in doing this comparison, there
PA> is enough error floating around that it is very unlikely that the normals
PA> of box faces that should be treated as coplanar will be *exactly* the
PA> same.  In general, what is the policy in ODE for handling these sorts of
PA> slightly inexact comparisons?

PA> The second question is face-edge collisions.  What's a good way of
PA> determining if a line (the edge) lies in the plane of the face?  Again,
PA> this has to be a slightly inexact comparison rather than an exact
PA> calculation because of error.  I've determined that face-edge collisions
PA> are absolutely crucial for good box stacking, since otherwise it becomes
PA> almost impossible for one box to come to rest upon another if the first
PA> one hits the supporting box at an angle.  Face-edge contacts need two
PA> contact joints, otherwise boxes will just tumble uncontrolably.

PA> I'm going to take a look at the box-plane collision code tomorrow, since
PA> it must already handle these issues correctly, perhaps differently (having
PA> an object that is infinite and static does make certain calculations
PA> easier!)



Box - box collision use axis separating. It never checks complanarity
of box faces and I do not think It will ever do it and do not think it really need
it.
But you can make your own alternative box-box collider than you can
see easy it or not :). May be it needs to spend more time looking at
the original box-box collider :).






-- 
Best regards,
Konstantin Slipchenko.                          mailto:slipch@gsc-game.kiev.ua