[ODE] 2D boxes

Geoff Carlton gcarlton at iinet.net.au
Fri Sep 15 00:37:09 MST 2006


Hi,
Anyone got 2D boxes working properly?  They have a tendancy to spin in 
all axes.  I've been playing around with the joint2D's correcting 
(wx,wy) angular velocity code, but I noticed the crux of the issue is 
the box-box contact generation.

Collide two boxes that are overlapped, and the result can come back with 
a set of contacts all pointing in the +Z direction.  The boxes were 
sitting on the z-plane with a correct 2D orientation.  This was clearly 
not the shortest "out" direction, but I'm not familiar with the box-box 
contact generation code so stepping through didn't illuminate the matter 
much.  Has somebody got expertise on the algorithm?

A bit of a hack is, if the normal is +-Z, scrub it and put in the geom 
pair's (pos2-pos1) as a replacement.  If I don't find a solution I can 
always use that, although it would be nicer to fix the underlying issue 
instead.

Thanks,
Geoff


More information about the ODE mailing list