[ODE] triangle collider surface

Nate W coding at natew.com
Fri May 10 17:25:02 2002


How do I create a surface for the triangle collider?  I've got the vertex
data from Demeter, put it into (what I think is) the format that the
tri-collide stuff expects, but my ODE bodies fall right through it.  

Right now my code basically does this:

	Call dCreateTriList to create the triangle list object,
	Build an array of dcVector3 objects
	Copy coordinates from Demeter's vertex array to the dcVector3 array
	Allocate an array of ints
	Initialize the ints with indices into the vertex array
	Call dGeomTriListBuild 
	delete the arrays
	start the simulation

But, the body in the sim just falls through the terrain.  ODE is calling
the collision callback, then I call dCollide, and dCollide says there were
no contacts.  Am I skipping a step?

Also, from looking at the source, it appears to me that the callback
functions passed into dCreateTriList() are optional, and collision
detection should work without them.  Am I correct, or does the fact that
I'm passing nulls for them explain the first problem? :-)

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com