Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ivp_intern/ivp_friction.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,19 @@ void IVP_Contact_Point::static_friction_single(const IVP_Event_Sim *es,
bool IVP_Contact_Point::friction_force_local_constraint_2d_wheel(
IVP_Core *core_a, IVP_Impact_Solver_Long_Term *info,
const IVP_Event_Sim *es, IVP_FLOAT &flEnergy) {
// Apply material-based damping to vehicle wheels.
IVP_Material* materials[2];
get_material_info(materials);

const IVP_DOUBLE damping = materials[1]->get_damping();

if (damping != 0.0) {
IVP_U_Float_Point rotation_damping;
rotation_damping.set_to_zero();

core_a->damp_object(es->delta_time, &rotation_damping, damping);
}

IVP_Constraint_Car_Object *wheel = core_a->car_wheel;
IVP_Constraint_Solver_Car *solver = wheel->solver_car;

Expand Down
1 change: 1 addition & 0 deletions ivp_physics/ivp_material.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class IVP_Material {
get_second_friction_factor() = 0; // second friction factor when two friction
// values is enabled
virtual IVP_DOUBLE get_elasticity() = 0;
virtual IVP_DOUBLE get_damping() { return 0.0; }
// INTERN_START
virtual IVP_DOUBLE get_adhesion() = 0; // for future releases
// INTERN_END
Expand Down