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

ref #2576
This commit is contained in:
Nathan Sweet 2024-07-12 07:08:43 -10:00
parent cc55a2eeba
commit 112bea0603

View File

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