Explorar o código

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

Davide Tantillo hai 7 meses
pai
achega
2d6c5381e9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;