[ODE] trimesh-box collisions

j ode at dynamica.org
Mon Apr 25 21:07:13 MST 2005


Hi all,

I'm trying to get my mind around the trimesh.
but I keep having some trouble getting trimesh-box
collisions right. There's an image at
http://www.dynamica.org/IMG/odeq.jpg

I do believe Ive set my environment correctly
by using dSINGLE-compiled ODE with my own
typedefs aligned to ODE's types.

When I replace the trimesh by a box, everything
works just fine; even though I do believe to have
built the trimesh properly:

dGeomTriMeshDataBuildSimple( tri_data, (const scalar *)&(ctrl_pnts[0][0]), \
    num_vertices, (Index*)&surface_indices[0], num_indices );

having num_vertices dVector3's in ctrl_pnts[0][0] and the right number of
indices. and having all triangles oriented ccw by using the correct indexing
order.

Whenever a box collides with the tri-mesh, it seems to collide only with the
edges of the tri-mesh, boxes can (sometimes) fall right through the
triangles, and
some boxes never come to rest on the trimesh at all; they keep moving up and
down
through triangles, like the ones in the image.

I finally believe to have set the CFM and ERP values correctly to -1e-5 and
0.2 resp. but haven't got a clue what's wrong.

anyone ?

thanks,

Jonathan



More information about the ODE mailing list