[ODE] local friction levels

Roel van Dijk roelvandijk at home.nl
Fri Sep 12 23:10:59 MST 2003


> im making a car racing simulation and wanted to know if its possible to
> dynamicly set the friction level of each wheel. so when i drive over a
> kerb, or put a wheel on the grass, the grip for that tire changes, and the
> handling changes to reflect it.
>
> atm, ive only got a global friction, but not sure how to set it localy for
> each tire.
ODE can't do that for you but it does provide the dGeomSetData function. It 
allows you to put any data you want inside a geom. I use it to store a 
pointer to a wrapper class that I've written. When there is a collision you 
only have to call dJointGetData on the 2 geoms. Then you can set the 
friction, bouncyness, anything you like according to the data stored in the 
geom (or the wrapper).


More information about the ODE mailing list