Falling anti-rotation correction.
this._updatePivots();
var GRAVITY = -0.0004;
var THRUST = 0.00035;
- var FRICTIONK = 0.6;
- var FRICTIONS = 2.0;
+ var FRICTIONK = 3.5;
+ var FRICTIONS = 5.0;
var DRAG_FREE = 0.01;
var DRAG_OPEN = 5.0;
var DRAG_LOCK = 10.0;
+ var CORRECTION = 3.0;
var leftAngle = (1 - this.leftPivot) * Math.PI / 2;
var rightAngle = (1 - this.rightPivot) * Math.PI / 2;
ax += drag * Math.max(cleft, cright) * vx * vx * -Math.sign(vx);
ay += drag * (sleft + sright) * vy * vy * -Math.sign(vy);
+ if (!this.up || this.free)
+ ax += CORRECTION * (cleft - cright) * vy * vy * Math.sign(vy);
+
var origX = this.x;
var origY = this.y;
this.y += vy + ay;