mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 17:48:45 +08:00
[libgdx] updateWorldTransform as late as possible.
Something can set a new animation after `act` but before `draw`, resuling in the wrong pose if updateWorldTransform is done in `act`.
This commit is contained in:
parent
bceee601ad
commit
66eabfc4d1
@ -58,7 +58,6 @@ public class SkeletonActor extends Actor {
|
||||
public void act (float delta) {
|
||||
state.update(delta);
|
||||
state.apply(skeleton);
|
||||
skeleton.updateWorldTransform();
|
||||
super.act(delta);
|
||||
}
|
||||
|
||||
@ -71,6 +70,7 @@ public class SkeletonActor extends Actor {
|
||||
skeleton.getColor().a *= parentAlpha;
|
||||
|
||||
skeleton.setPosition(getX(), getY());
|
||||
skeleton.updateWorldTransform();
|
||||
renderer.draw(batch, skeleton);
|
||||
|
||||
if (resetBlendFunction) batch.setBlendFunctionSeparate(blendSrc, blendDst, blendSrcAlpha, blendDstAlpha);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user