No subject


Tue Nov 15 16:38:34 MST 2005


box-sphere colliders - this can be caused by OPCODE that uses single
precision; or from the fact that tri-something collision is much more
complicated than, say, sphere-box collision.

> > I'm currently using BoxGeoms for roads for my vehicles.  I'm wondering
> > if there is a more performant solution.
> > All I really need is a 2D rectangle to collided against, or put another
> > way, a bounded plane!

You can have several problems with boxes: first, when you have several
adjacent boxes, you obtain several contacts when the wheel hits the
boundary - you'll have to implement merging of these contacts yourself (or
the car will jump slightly on the boundaries).

Second - you usually need to collide with only the "top" face of the box
(that is, a bounded plane). If you use plain box and the wheel approaches
the edge of the box, the contact normal may go not in the "up" direction,
but in the "side" direction (when there's smaller distance to the box side
than to the up face").

For my car simulation I was considering adding additional code to the ODE's
native box geometry: eg. a flag "collide with upper face only", and modify
box-sphere collider (and possibly the others as well, but they don't matter
much for a car sim). That's pretty easy to do, as it just projects the
sphere onto the box axes and chooses minimal depth (well, I thing there's a
bug - in some cases it chooses the maximal depth). You just have to modify
it so it always projects onto the top face.


Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/




More information about the ODE mailing list