mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
Improved fix for TransformMode.noRotationOrReflection with skeleton scale.
#1668 http://esotericsoftware.com/forum/WebGL-ScaleX-Question-13983
This commit is contained in:
parent
6a9403511d
commit
d7203eec1a
@ -151,6 +151,8 @@ public class Bone implements Updatable {
|
||||
float s = pa * pa + pc * pc, prx;
|
||||
if (s > 0.0001f) {
|
||||
s = Math.abs(pa * pd - pb * pc) / s;
|
||||
pa /= skeleton.scaleX;
|
||||
pc /= skeleton.scaleY;
|
||||
pb = pc * s;
|
||||
pd = pa * s;
|
||||
prx = atan2(pc, pa) * radDeg;
|
||||
@ -169,7 +171,7 @@ public class Bone implements Updatable {
|
||||
b = pa * lb - pb * ld;
|
||||
c = pc * la + pd * lc;
|
||||
d = pc * lb + pd * ld;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
case noScale:
|
||||
case noScaleOrReflection: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user