From 89441caabda3678e988d1718d29fb270edf3d547 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Mon, 3 Feb 2025 15:39:09 +0100 Subject: [PATCH] [csharp] Apply skeleton.scaleX/scaleY to wind and gravity. See #2729. Port of commit 5a71b51. --- spine-csharp/src/PhysicsConstraint.cs | 2 +- spine-csharp/src/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-csharp/src/PhysicsConstraint.cs b/spine-csharp/src/PhysicsConstraint.cs index 1ab3000a9..bb14f1404 100644 --- a/spine-csharp/src/PhysicsConstraint.cs +++ b/spine-csharp/src/PhysicsConstraint.cs @@ -175,7 +175,7 @@ namespace Spine { } if (a >= t) { d = (float)Math.Pow(damping, 60 * t); - float m = massInverse * t, e = strength, w = wind * f, g = (Bone.yDown ? -gravity : gravity) * f; + float m = massInverse * t, e = strength, w = wind * f * skeleton.ScaleX, g = (Bone.yDown ? -gravity : gravity) * f * skeleton.ScaleY; do { if (x) { xVelocity += (w - xOffset * e) * m; diff --git a/spine-csharp/src/package.json b/spine-csharp/src/package.json index 3d4bb86eb..4ea5e9f60 100644 --- a/spine-csharp/src/package.json +++ b/spine-csharp/src/package.json @@ -2,7 +2,7 @@ "name": "com.esotericsoftware.spine.spine-csharp", "displayName": "spine-csharp Runtime", "description": "This plugin provides the spine-csharp core runtime.", - "version": "4.2.33", + "version": "4.2.34", "unity": "2018.3", "author": { "name": "Esoteric Software",