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] Wildcard for AnimationState mix data. #949

Open
pharan opened this issue Jul 19, 2017 · 4 comments
Open

[AnimationState] Wildcard for AnimationState mix data. #949

pharan opened this issue Jul 19, 2017 · 4 comments

Comments

@pharan
Copy link
Contributor

pharan commented Jul 19, 2017

Sometimes, you always want a specific animation to start without mix, or end without a mix, so you need to set its mix duration to 0 when you play that animation, or play something from it.

Or you want a specific animation to start playing with a certain mix duration regardless of what animation came before it.

It would be convenient if we could define this in AnimationStateData.

http://esotericsoftware.com/forum/Set-mixing-to-value-for-all-animations-9030

@badlogic
Copy link
Collaborator

Would setting start/end mix for an animation overwrite mix durations set for animation pairs?

@pharan
Copy link
Contributor Author

pharan commented Aug 23, 2017

Logically, I think the checks would be in this order/priority:

  1. animation pair (animationA->animationB)
  2. to wildcard (animationA->*)
  3. from wildcard (* -> animationB)
  4. default mix

On the other hand... that already sounds messy.

@badlogic
Copy link
Collaborator

Evaluation order looks good. API works like this:

setMix("a", null, 0.2);
setMix(null, "a", 0.2);

Hurray...

@pharan
Copy link
Contributor Author

pharan commented May 30, 2018

We currently have no ETA for this. But you can make do without this, currently.
It's just that the AnimationState doesn't do it for you out of the box.

To do this yourself, you would just check the value of the currently playing animation, and the next animation you want to play, and then set the mixDuration of the returned TrackEntry (from your setAnimation call) accordingly.

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

No branches or pull requests

3 participants