Great! :clap: Note you are setting the run animation on track 0. I think you want track 1 here:
entry = state.SetAnimation(0, "run", true);
In other words, you want this:
entry = state.SetAnimation(1, "run", true);
pascalkk написалthis way just like "stateData.SetMix("walk", "run", mixTime);"?
You can set the mix duration that way, yes. You can also set the mix duration on the TrackEntry (which you are already doing).
entry = state.SetAnimation(0, "run", true);
entry.mixDuration = 5.5f;
For example, if you want to transition from walk to run over 5.5 seconds:
state.SetAnimation(0, "walk", true);
TrackEntry entry = state.SetAnimation(0, "run", true);
entry.mixDuration = 5.5f;
This will mix from walk to run over 5.5 seconds without needing to mess with TrackEntry alpha
at all. You would only need TrackEntry alpha
if you don't know how long your mix will take, or if it is based on game state (like how long a player holds a run button or how much damage has been taken).