From 2d6c5381e9226f22b7d20227321fefda4383e06e Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Thu, 6 Feb 2025 09:36:50 +0100 Subject: [PATCH] [ts] Fixed yDown branch of previous commit 89441ca leading to upward gravity. See #2729. --- spine-ts/spine-core/src/PhysicsConstraint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-ts/spine-core/src/PhysicsConstraint.ts b/spine-ts/spine-core/src/PhysicsConstraint.ts index 954c5592a..139013f59 100644 --- a/spine-ts/spine-core/src/PhysicsConstraint.ts +++ b/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;