[ODE] enhanced ODE collision API

David McClurg dmcclurg at pandemicstudios.com.au
Fri Oct 25 01:19:02 2002


>> A 'dTriMeshClass' geom is really an aggregate type so I need to know the index of the triangle to lookup material properties.  The material properties tell me how to create the contact, light the player, etc.
> You need the index of the triangle in the near callback when creating the joint? Hm.. Do you have a suggestion?

if there is a callback for each contact generated, the callback could query the index.  otherwise, you could put it into the dContactGeom struct, but since they could both be a mesh, you would need two-- i1,i2.

maybe this is a good time to bring up the idea of a generalized event handler instead of callbacks.  you get an event when the contact is generated instead of passing an array.  you store it off then and query the index if needed.

>> Also, it would be handy to expose erwin's combine contacts functionality. It seems to be essential even between meshes/planes in my game (i'll post some test programs soon to show this).
> You're actually using the mesh-plane intersection?? Daring.

no, i'm sorry. i meant my player collides with many static meshes and planes in the world.  i combine the contacts between the player sphere and all the triangle & plane contacts to get smooth physics.

> My contact-combine code only works for spheres-triangle contacts. Its actually there because ODE doesnt like many close contacts.

that's what i've noticed. why doesn't ODE like close contacts?  hmmm.  got to investigate that soon.