فهرست منبع

[libgdx] Fixed physics constraint limit with negative skeleton scale.

ref #2576
Nathan Sweet 1 سال پیش
والد
کامیت
112bea0603
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PhysicsConstraint.java

+ 2 - 2
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PhysicsConstraint.java

@@ -153,8 +153,8 @@ public class PhysicsConstraint implements Updatable {
 				uy = by;
 			} else {
 				float a = remaining, i = inertia, t = data.step, f = skeleton.data.referenceScale, d = -1;
-				float qx = data.limit * delta, qy = qx * skeleton.scaleY;
-				qx *= skeleton.scaleX;
+				float qx = data.limit * delta, qy = qx * Math.abs(skeleton.scaleY);
+				qx *= Math.abs(skeleton.scaleX);
 				if (x || y) {
 					if (x) {
 						float u = (ux - bx) * i;