Forums
Bug in cardynamics.cpp LoadWheel code - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3)
+--- Forum: Bugs (https://www.vdrift.net/Forum/forumdisplay.php?fid=7)
+--- Thread: Bug in cardynamics.cpp LoadWheel code (/showthread.php?tid=1536)



Bug in cardynamics.cpp LoadWheel code - LBodnar - 07-30-2011

Code:
    if (!cfg.get("mass", mass) && !cfg.get("inertia", inertia))
    {
...
        mass = tire_mass + rim_mass;
        inertia = (tire_inertia + rim_inertia) * 4;    // scale inertia fixme
    }
    wheel.SetMass(mass);
    wheel.SetInertia(inertia);        // inertia of associated driveshaft

If the "mass" parameter is present in .car file then second part of the if() statement will not be evaluated and inertia = 0 even if present in .car file.


- NaN - 07-31-2011

Fixed, thanks.