Fixed root bone translation.

Again.
This commit is contained in:
NathanSweet 2014-01-17 00:58:29 +01:00
parent 9787e7cee7
commit 2b241c3628
4 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -80,7 +80,7 @@ namespace Spine {
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;

View File

@ -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;