Skip to content

Commit

Permalink
Update skeleton in preview
Browse files Browse the repository at this point in the history
  • Loading branch information
fgnm committed Apr 19, 2024
1 parent 888074b commit aba5cd2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public void configureSkeleton(SkeletonData skeletonData) {

animationState.update(0.1f); // Update the animation time.
animationState.apply(skeleton); // Poses skeleton using current animations. This sets the bones' local SRT.\
skeleton.update(0.1f);
skeleton.setPosition(0, 0);
skeleton.updateWorldTransform(Skeleton.Physics.update); // Uses the bones' local SRT to compute their world SRT.

Expand Down Expand Up @@ -257,6 +258,7 @@ public void update(float delta, boolean isSkeletonPaused) {

if(!isSkeletonPaused) {
animationState.update(delta);
skeleton.update(delta);
animationState.apply(skeleton);
}

Expand Down

0 comments on commit aba5cd2

Please sign in to comment.