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

This commit is contained in:
Davide Tantillo 2025-01-30 11:13:27 +01:00
parent f8bcbb3e59
commit 5a71b51f02

View File

@ -168,7 +168,7 @@ public class PhysicsConstraint implements Updatable {
}
if (a >= t) {
d = (float)Math.pow(damping, 60 * t);
float m = massInverse * t, e = strength, w = wind * f, g = gravity * f;
float m = massInverse * t, e = strength, w = wind * f * skeleton.scaleX, g = gravity * f * skeleton.scaleY;
do {
if (x) {
xVelocity += (w - xOffset * e) * m;