[ODE] ode 0.5 vs ode 0.8

Vianney Lecroart acemtp at gmail.com
Tue Apr 24 01:35:11 MST 2007


I use ode for a few years and with the cvs ode 0.5, my game is working fine.
After 2 years, I decided to get the latest ode with the new svn (tags 0.8)

And now my trimesh don't collide anymore. The plane still collide so I
think it's really a trimesh problem.

I found why it happens and I share this with you for archive purpose
(if anybody have the same problem).

The dCreateTriMesh() function behavior changed between 0.5 and 0.8.

Before I did that and it worked on 0.5:

static int _dTriCallback(dGeomID TriMesh, dGeomID RefObject, int
TriangleIndex) {return 0;}
static void _dTriArrayCallback(dGeomID TriMesh, dGeomID RefObject,
const int* TriIndices, int TriCount) {}
static int _dTriRayCallback(dGeomID TriMesh, dGeomID Ray, int
TriangleIndex, dReal u, dReal v) {return 0;}

Geom = dCreateTriMesh(Space, triMeshDataId, _dTriCallback,
_dTriArrayCallback, _dTriRayCallback);

With 0.8 it doesn't generate collision with the trimesh so instead,
you have to do:

Geom = dCreateTriMesh(Space, triMeshDataId, 0, 0, 0);

Vianney Lecroart


More information about the ODE mailing list