]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Gear.cpp
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / YASim / Gear.cpp
index b214178de9053fab5fe103b0dd12a9b099747ad5..7950c2ef2d98263379514f099cf01cbb2a440c9e 100644 (file)
@@ -183,6 +183,8 @@ void Gear::calcForce(RigidBody* body, State *s, float* v, float* rot)
     if(a > 0) {
        _wow = 0;
        _frac = 0;
+        _rollSpeed = 0;
+        _casterAngle = 0;
        return;
     }
 
@@ -270,7 +272,11 @@ void Gear::calcForce(RigidBody* body, State *s, float* v, float* rot)
 
     if(_castering) {
         _rollSpeed = Math::sqrt(vsteer*vsteer + vskid*vskid);
-        _casterAngle = Math::atan2(vskid, vsteer);
+        // Don't modify caster angle when the wheel isn't moving,
+        // or else the angle will animate the "jitter" of a stopped
+        // gear.
+        if(_rollSpeed > 0.05)
+            _casterAngle = Math::atan2(vskid, vsteer);
         return;
     } else {
         _rollSpeed = vsteer;