mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-12 18:18:43 +08:00
[csharp] Port of commit 9cd5b3b. Fixed shear causing physics to explode.
This commit is contained in:
parent
27faa5cd3b
commit
02911a2bf4
@ -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;
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user