[ODE] Best way to use ODE for collision detection in game level?

Enrico Zschemisch enrico.zschemisch at gmx.de
Thu May 31 11:21:08 MST 2007


Hi,

I am trying to use ODE for collision detection in one of my applications. This application has a map, which consists of several triangle meshes. All in all, there are 18000 triangles. All of these triangles meshes are static and can not move. The only dynamic thing is a collision sphere around the camera.

When updating the world with dWorldQuickStep() it takes 300ms for the update.  Half the time is taken up by my callback for dSpaceCollide(), the other half is used by dWorldQuickStep(). The weird thing is, I can deactivate all the bodies and it still requires 300ms for the update.

The triangle meshes are created with:
mesh.bodyID = dBodyCreate(odeWorld);

dTriMeshDataID TriMeshData = dGeomTriMeshDataCreate();
dGeomTriMeshDataBuildSingle(...);
mesh.geomID = dCreateTriMesh(odeSpace, TriMeshData, 0, 0, 0);

dGeomSetData(mesh.geomID, TriMeshData);
dGeomSetPosition(mesh.geomID, 0,0,0);
dGeomSetBody(mesh.geomID, mesh.bodyID);

I experimented with the hash space and quad tree, but nothing helps. 

The mailing list archives are unreachable (for me) currently, so I can't check if this was discussed previously. 

Any hints?

Thank you, Enrico
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser


More information about the ODE mailing list