mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[haxe] Fix bone inherit. Closes #2664.
This commit is contained in:
parent
97a83c2430
commit
c6eaac2b1f
@ -152,7 +152,7 @@ class Bone implements Updatable {
|
||||
worldX = pa * x + pb * y + parent.worldX;
|
||||
worldY = pc * x + pd * y + parent.worldY;
|
||||
|
||||
switch (data.inherit) {
|
||||
switch (inherit) {
|
||||
case Inherit.normal:
|
||||
var rx:Float = (rotation + shearX) * MathUtils.degRad;
|
||||
var ry:Float = (rotation + 90 + shearY) * MathUtils.degRad;
|
||||
@ -211,7 +211,7 @@ class Bone implements Updatable {
|
||||
za *= s;
|
||||
zc *= s;
|
||||
s = Math.sqrt(za * za + zc * zc);
|
||||
if (data.inherit == Inherit.noScale && ((pa * pd - pb * pc < 0) != ((sx < 0) != (sy < 0)))) {
|
||||
if (inherit == Inherit.noScale && ((pa * pd - pb * pc < 0) != ((sx < 0) != (sy < 0)))) {
|
||||
s = -s;
|
||||
}
|
||||
rotation = Math.PI / 2 + Math.atan2(zc, za);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user