Explorar o código

[haxe] Apply skeleton.scaleX/scaleY to wind and gravity. See #2729.

Davide Tantillo hai 8 meses
pai
achega
59c47a2c02
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      spine-haxe/spine-haxe/spine/PhysicsConstraint.hx

+ 2 - 2
spine-haxe/spine-haxe/spine/PhysicsConstraint.hx

@@ -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;