mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[cpp] Resolves #2974, brings spine-cpp inline with spine-libgdx.
This commit is contained in:
parent
99ebb13edf
commit
efab42d1b5
@ -180,14 +180,14 @@ void TransformConstraint::applyAbsoluteWorld() {
|
|||||||
bone._worldY += (ty - bone._worldY) * mixY;
|
bone._worldY += (ty - bone._worldY) * mixY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mixScaleX > 0) {
|
if (mixScaleX != 0) {
|
||||||
float s = MathUtil::sqrt(bone._a * bone._a + bone._c * bone._c);
|
float s = MathUtil::sqrt(bone._a * bone._a + bone._c * bone._c);
|
||||||
if (s != 0) s = (s + (MathUtil::sqrt(ta * ta + tc * tc) - s + _data._offsetScaleX) * mixScaleX) / s;
|
if (s != 0) s = (s + (MathUtil::sqrt(ta * ta + tc * tc) - s + _data._offsetScaleX) * mixScaleX) / s;
|
||||||
bone._a *= s;
|
bone._a *= s;
|
||||||
bone._c *= s;
|
bone._c *= s;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mixScaleY > 0) {
|
if (mixScaleY != 0) {
|
||||||
float s = MathUtil::sqrt(bone._b * bone._b + bone._d * bone._d);
|
float s = MathUtil::sqrt(bone._b * bone._b + bone._d * bone._d);
|
||||||
if (s != 0) s = (s + (MathUtil::sqrt(tb * tb + td * td) - s + _data._offsetScaleY) * mixScaleY) / s;
|
if (s != 0) s = (s + (MathUtil::sqrt(tb * tb + td * td) - s + _data._offsetScaleY) * mixScaleY) / s;
|
||||||
bone._b *= s;
|
bone._b *= s;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user