[ODE] friction and restitution

Adam D. Moss adam at gimp.org
Sat Oct 2 22:45:27 MST 2004


Dimitris Papavasiliou wrote:
> So isn't there a way to define some sort of friction and restitution 
> coefficients *per body* not per pair and then be able to calculate the 
> coefficients for the pair from them?

Certainly.  Attach your own structure with this (and any other)
per-body attributes to the body with dBodySetData().  Then in
the collision callback, use dBodyGetData() to get the attributes
off the bodies again and calculate appropriate friction etc.
for the pair.

--Adam


More information about the ODE mailing list