[csharp] Port of commit 9cd5b3b. Fixed shear causing physics to explode.

This commit is contained in:
Harald Csaszar 2023-12-05 20:18:14 +01:00
parent 27faa5cd3b
commit 02911a2bf4
2 changed files with 2 additions and 2 deletions

View File

@ -168,7 +168,7 @@ namespace Spine {
if (rotateOrShearX || scaleX) {
float ca = (float)Math.Atan2(bone.c, bone.a), c, s, mr = 0;
if (rotateOrShearX) {
mr = mix * data.rotate;
mr = (data.rotate + data.shearX) * mix;
float dx = cx - bone.worldX, dy = cy - bone.worldY, r = (float)Math.Atan2(dy + ty, dx + tx) - ca - rotateOffset * mr;
rotateOffset += (r - (float)Math.Ceiling(r * MathUtils.InvPI2 - 0.5f) * MathUtils.PI2) * i;
r = rotateOffset * mr + ca;

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.4",
"version": "4.2.5",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",