Browse Source

[ts] Fixed yDown branch of previous commit 89441ca leading to upward gravity. See #2729.

Davide Tantillo 7 months ago
parent
commit
2d6c5381e9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      spine-ts/spine-core/src/PhysicsConstraint.ts

+ 1 - 1
spine-ts/spine-core/src/PhysicsConstraint.ts

@@ -163,7 +163,7 @@ export class PhysicsConstraint implements Updatable {
 						}
 						if (a >= t) {
 							d = Math.pow(this.damping, 60 * t);
-							const m = this.massInverse * t, e = this.strength, w = this.wind * f * skeleton.scaleX, g = (Skeleton.yDown ? -this.gravity : this.gravity) * f * skeleton.scaleY;
+							const m = this.massInverse * t, e = this.strength, w = this.wind * f * skeleton.scaleX, g = this.gravity * f * skeleton.scaleY;
 							do {
 								if (x) {
 									this.xVelocity += (w - this.xOffset * e) * m;