Skip to content

Commit

Permalink
Fixed root bone translation.
Browse files Browse the repository at this point in the history
Again.
  • Loading branch information
NathanSweet committed Jan 16, 2014
1 parent 9787e7c commit 2b241c3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spine-as3/spine-as3/src/spine/Bone.as
Expand Up @@ -73,7 +73,7 @@ public class Bone {
_worldRotation = _data.inheritRotation ? _parent._worldRotation + rotation : rotation;
} else {
_worldX = flipX ? -x : x;
_worldY = (flipY && spine.Bone.yDown != flipY) ? -y : y;
_worldY = flipY != yDown ? -y : y;
_worldScaleX = scaleX;
_worldScaleY = scaleY;
_worldRotation = rotation;
Expand Down
2 changes: 1 addition & 1 deletion spine-c/src/spine/Bone.c
Expand Up @@ -71,7 +71,7 @@ void spBone_updateWorldTransform (spBone* self, int flipX, int flipY) {
self->data->inheritRotation ? self->parent->worldRotation + self->rotation : self->rotation;
} else {
CONST_CAST(float, self->worldX) = flipX ? -self->x : self->x;
CONST_CAST(float, self->worldY) = (flipY && flipY != yDown) ? -self->y : self->y;
CONST_CAST(float, self->worldY) = flipY != yDown ? -self->y : self->y;
CONST_CAST(float, self->worldScaleX) = self->scaleX;
CONST_CAST(float, self->worldScaleY) = self->scaleY;
CONST_CAST(float, self->worldRotation) = self->rotation;
Expand Down
2 changes: 1 addition & 1 deletion spine-csharp/src/Bone.cs
Expand Up @@ -80,7 +80,7 @@ public class Bone {
worldRotation = data.inheritRotation ? parent.worldRotation + rotation : rotation;
} else {
worldX = flipX ? -x : x;
worldY = (flipY && flipY != yDown) ? -y : y;
worldY = flipY != yDown ? -y : y;
worldScaleX = scaleX;
worldScaleY = scaleY;
worldRotation = rotation;
Expand Down
2 changes: 1 addition & 1 deletion spine-js/spine.js
Expand Up @@ -80,7 +80,7 @@ spine.Bone.prototype = {
this.worldRotation = this.data.inheritRotation ? parent.worldRotation + this.rotation : this.rotation;
} else {
this.worldX = flipX ? -this.x : this.x;
this.worldY = (flipY && spine.Bone.yDown != flipY) ? -this.y : this.y;
this.worldY = flipY != spine.Bone.yDown ? -this.y : this.y;
this.worldScaleX = this.scaleX;
this.worldScaleY = this.scaleY;
this.worldRotation = this.rotation;
Expand Down

0 comments on commit 2b241c3

Please sign in to comment.