Skip to content

Commit

Permalink
[haxe] Fix bone inherit. Closes #2664.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidetan committed Nov 8, 2024
1 parent 97a83c2 commit c6eaac2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spine-haxe/spine-haxe/spine/Bone.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c6eaac2

Please sign in to comment.