Skip to content

Commit

Permalink
[haxe] 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 7e1de83 commit 59c47a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spine-haxe/spine-haxe/spine/PhysicsConstraint.hx
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ class PhysicsConstraint implements Updatable {
d = Math.pow(damping, 60 * t);
var m:Float = massInverse * t,
e:Float = strength,
w:Float = wind * f,
g:Float = (Bone.yDown ? -gravity : gravity) * f;
w:Float = wind * f * skeleton.scaleX,
g:Float = (Bone.yDown ? -gravity : gravity) * f * skeleton.scaleY;
do {
if (x) {
xVelocity += (w - xOffset * e) * m;
Expand Down

0 comments on commit 59c47a2

Please sign in to comment.