Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AnimationState] Some problem with mixing out not in order. #970

Closed
pharan opened this issue Aug 22, 2017 · 3 comments
Closed

[AnimationState] Some problem with mixing out not in order. #970

pharan opened this issue Aug 22, 2017 · 3 comments
Assignees

Comments

@pharan
Copy link
Contributor

pharan commented Aug 22, 2017

This totalAlpha condition seems to be preventing an ended TrackEntry (mixTime > mixDuration) from actually being ended.

if (from.totalAlpha == 0) {
to.mixingFrom = from.mixingFrom;
to.interruptAlpha = from.interruptAlpha;
queue.end(from);
}

With this condition in place, it seems to present the problem linked below. Commenting it out removes it.
http://esotericsoftware.com/forum/Wrong-animation-mix-9188

The bug may also be related to this:

if (to.mixDuration == 0) // Single frame mix to undo mixingFrom changes.
mix = 1;

As the code passes through this branch several times instead of only once, because the TrackEntry doesn't end.

@NathanSweet
Copy link
Member

@pharan How can I see this with the ref impl? I tried:

state.getData().setMix("stand", "move", 0.3f);
state.setAnimation(0, "move", true);
state.addAnimation(0, "stand", true, 2);
state.addAnimation(0, "attack_1", false, 2);
state.addAnimation(0, "move", true, 2);
state.addAnimation(0, "stand", true, 0.81f);
state.addAnimation(0, "attack_1", false, 0.2f);

I don't see meshes that aren't reset to the setup pose, though I don't really know what I'm looking for. I also tried using setAnimation with sleeps between them.

@pharan
Copy link
Contributor Author

pharan commented Aug 23, 2017

@NathanSweet I actually ran into the same problem.

vzlomvl mistyped.

state.getData().setMix("move", "stand", 0.3f); // should be move-stand. not stand-move as vzlomvl posted.
state.setAnimation(0, "move", true);
state.addAnimation(0, "stand", true, 0.81f);
state.addAnimation(0, "attack_1", false, 0.2f); // look at her left pant leg.

That should repro it.
The first three animations just demonstrate a case where it isn't broken.

@NathanSweet
Copy link
Member

Ah, thanks @pharan! I think I have a good fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants