Skip to content

Commit

Permalink
[ts] Apply skeleton.scaleX/scaleY to wind and gravity. See #2729.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidetan committed Jan 24, 2025
1 parent 9f3431e commit 7e1de83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spine-ts/spine-core/src/PhysicsConstraint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, g = (Skeleton.yDown ? -this.gravity : this.gravity) * f;
const m = this.massInverse * t, e = this.strength, w = this.wind * f * skeleton.scaleX, g = (Skeleton.yDown ? -this.gravity : this.gravity) * f * skeleton.scaleY;
do {
if (x) {
this.xVelocity += (w - this.xOffset * e) * m;
Expand Down

0 comments on commit 7e1de83

Please sign in to comment.