[ODE] OPCODE trimesh troubles -- collisions with undesired faces

jon klein jk at artificial.com
Mon Nov 19 20:44:02 MST 2007


Hi folks,

I've used trimeshes before with some success, but I've now run into a  
problem using OPCODE with certain meshes that I cannot figure out.

The problem is that I'm getting collisions with undesired faces due to  
the shape of the mesh.  The simplest scenario to exhibit the problem  
is one extruded rectangle mesh hitting another at a perpendicular  
angle so that they make a plus shape: +

That description probably isn't totally clear, so here's a screenshot: http://spiderland.org/trimesh.png

Clearly the two shapes are colliding on the axis looking down into the  
"plus" -- and they collisions are being found correctly.  The problem  
is that OPCODE is also returning very deep collisions for the faces  
normal to the "arms" of the plus shape.  In the screenshot, for  
example, the +Y face would be getting a collision with a depth of .5,  
and same for the negative face.

The collisions are more than deep enough to make ODE freak out.  And  
while they're technically correct, they should really just be handled  
on the Z-axis.

Has anybody encountered this problem before?  Is there something in my  
data that is not conveying the proper topology required to handle this  
situation correctly?  How is this problem normally be handled by the  
collider (because clearly there will always be other faces being  
violated by any collision)?

Any help is appreciated.

Thanks,

-- jon


More information about the ODE mailing list