[ODE] integrating ODE, friction, terrains, collision

Clint Brewer clint at haptek.com
Wed Feb 12 15:11:02 2003


Hi All,

  I've been playing arround with converting my own physics code over to 
use ode in a game engine.
After struggling through getting my terrain to collide with the ODE 
geometry objects, and getting the orientations of objects to match up to 
my coordinate system, I've got a bunch of spheres bouncing and rolling 
arround. 

The process wasn't too difficult either, with a lot of google searching 
this list, and reading over the documentation.
I think the most difficult problem so far was a silly mistake on my part 
with the collision between my terrain and the spheres.
I was always generating the point of contact at the bottom of the 
sphere.  This caused the spheres to rotate in a seemingly odd way, such 
that when they should be rotating clockwise they were rotating 
counterclockwise.  For the longest time I was convinced that it was my 
conversion from ODE's rotation matrix to my coordinate system (and spent 
far too long searching down that avenue).  But once I found that I had 
to generate the point of contact in the right place, it all started working.

It feels so good to see it working.  :) 

Now I'm at the point of converting my old terminal velocity, wind drag, 
coefficient of static and kinetic friction over to the ODE mu friction.  
I've searched and haven't seen an exact answer to this. Might be 
something good to include in the future documentation. If it's already 
there please point it out.  I know many people on this list have done 
the same sort of thing that I'm doing and was wondering if any of you 
would share how you went about turning your  static and kinetic friction 
coefficients into ODE's version of friction.  Or if you decided to just 
do the friction calculation yourself  and add other forces into the system.

I'm also curious if any of you are succesfully using ODE as your 
visibility determination system.  I haven't tried yet, but It seem that 
all the collision code will work just fine for visibility determination too.

thanks for any help,
Clint