• Runtimes
  • How to create Mixing Animation ?

I found a skeletal animation of some exciting new features:

Mixing Animations can be blended together. For example, a character could play a shoot animation while also playing a walk, run or swim animation. Changing from one animation to another can be smoothly crossfaded.

I don't know how to use it . Do you have some examples ?

Related Discussions
...

Which Runtime?

Mitch escreveu

Which Runtime?

edit oops you linked to Unity examples I see heh.

https://github.com/EsotericSoftware/spi ... Spine/Hero

Select Hero_SkeletonData in the inspector. You will see Mix table.

Ex:
[Walk] [Jump] 0.2
When transition from "Walk" to "Jump" it will take 0.2 seconds. This is "Crossfading"

To play multiple animations ( or Mix them ) you can use skeletonAnimation.state.SetAnimation( trackNumber*, trackName, loop )

Track number is the important part.

Ex:
If Walk is playing in Track 0, you can play Shoot in Track 1 without interrupting Walk. Make sure that Shoot only animates the Arm and Gun; do not make keyframes for legs.

Finally (and most advanced / confusing for most) is the skeleton.Mix function which lets you blend (per frame) to another animation. This enables you to do whatever you want in terms of blending animations (like Blend Trees in Mecanim)
http://www.xdtech.net/spine/BlendTree.html

19 dias depois

You are right that the mix funktion is the most confusing 🙂. Is there any examples or anywhere I can read more?

I want to play two animations simultaneous in unity. So I guess I need to mix them.

You only need mix if you need to play both on the same track. Ex: you want a jog animation but only have a walk and a run. You can 50% mix them and get something interesting.

If you just need something like Wave your Hand to play while walking, just play it in a higher track.

I thought I tried that already and it didn't work. But of course you are completely right, now it's working 🙂
Been tearing my hair out for no reason.

Thank you!