void NewtonBodySetLinearDamping( const NewtonBody* bodyPtr, dFloat linearDamp)
Apply the linear viscous damping coefficient to the body.
- const NewtonBody *bodyPtr - is the pointer to the body.
- dFloat linearDamp - linear damping coefficient.
- the default value of linearDamp is clamped to a value between 0.0 and 1.0; the default value is 0.1, There is a non zero implicit attenuation value of 0.0001 assume by the integrator.
- The dampening viscous friction force is added to the external force applied to the body every frame before going to the solver-integrator. This force is proportional to the square of the magnitude of the velocity to the body in the opposite direction of the velocity of the body. An application can set linearDamp to zero when the application takes control of the external forces and torque applied to the body, should the application desire to have absolute control of the forces over that body. However, it is recommended that the linearDamp coefficient is set to a non-zero value for the majority of background bodies. This saves the application from having to control these forces and also prevents the integrator from adding very large velocities to a body.