[ODE] change mass of a body

Roel van Dijk R.vanDijk at rad.umcn.nl
Thu Oct 2 09:22:27 MST 2003


> how does the mass of a body change him without creating some problems?
Do you want to know how to change the mass of a body?

// This sets the mass of 'body' to 10.0
dBodyID body;
dMass mass;
dBodyGetMass(body, &mass);
dMassAdjust (&mass, 10.0);
dBodySetMass(body, &mass);

You could also look at the mass functions in the documentation:
http://opende.sourceforge.net/ode-latest-userguide.html#ref67




More information about the ODE mailing list