Skip to content

Commit

Permalink
Added world rotation to root bone, should do something for #77
Browse files Browse the repository at this point in the history
  • Loading branch information
AleBles committed Aug 24, 2017
1 parent 6b31fc0 commit 2a69f8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ts/Spine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,11 @@ module PhaserSpine {
public update(): void {
super.update();

this.skeleton.color.a = this.worldAlpha;

this.state.update(this.game.time.elapsed / 1000);
this.state.apply(this.skeleton);

this.skeleton.color.a = this.worldAlpha;
this.skeleton.getRootBone().rotation = this.worldRotation * 180 / Math.PI;
this.skeleton.updateWorldTransform();
}

Expand Down

0 comments on commit 2a69f8f

Please sign in to comment.