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

Enrico Zschemisch enrico.zschemisch at gmx.de
Sun Jun 17 10:18:12 MST 2007


Hi,

this is my second try.

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
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the ODE mailing list