[csharp] Apply skeleton.scaleX/scaleY to wind and gravity. See #2729. Port of commit 5a71b51.

This commit is contained in:
Harald Csaszar 2025-02-03 15:39:09 +01:00
parent 06f6e1473c
commit 89441caabd
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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",