Bladeren bron

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

Harald Csaszar 7 maanden geleden
bovenliggende
commit
89441caabd
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 1 1
      spine-csharp/src/PhysicsConstraint.cs
  2. 1 1
      spine-csharp/src/package.json

+ 1 - 1
spine-csharp/src/PhysicsConstraint.cs

@@ -175,7 +175,7 @@ namespace Spine {
 						}
 						}
 						if (a >= t) {
 						if (a >= t) {
 							d = (float)Math.Pow(damping, 60 * 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 {
 							do {
 								if (x) {
 								if (x) {
 									xVelocity += (w - xOffset * e) * m;
 									xVelocity += (w - xOffset * e) * m;

+ 1 - 1
spine-csharp/src/package.json

@@ -2,7 +2,7 @@
 	"name": "com.esotericsoftware.spine.spine-csharp",
 	"name": "com.esotericsoftware.spine.spine-csharp",
 	"displayName": "spine-csharp Runtime",
 	"displayName": "spine-csharp Runtime",
 	"description": "This plugin provides the spine-csharp core runtime.",
 	"description": "This plugin provides the spine-csharp core runtime.",
-	"version": "4.2.33",
+	"version": "4.2.34",
 	"unity": "2018.3",
 	"unity": "2018.3",
 	"author": {
 	"author": {
 		"name": "Esoteric Software",
 		"name": "Esoteric Software",