• Unity
  • Additive Track Scaling Problem

Hi everyone,

Thanks again for Spine and the great updates !

I think I'm running into a bug although I might doing it wrong.
I'm doing something pretty standard : using 1 track for a pose, and 1 additive track for breathing motion.

Here are some videos :
Pose (preview in Spine Editor) :

Breathing (preview in Spine Editor) :

Expected result (preview in Spine Editor) :

Actual result (in Unity) :

As you can see, it is additive indeed, but the breathing animation keeps adding over itself, but only the scale part (translation & rotation are fine).

Here is the code :

//First track : Pose
Spine.TrackEntry trackEntry = skeletonAnimation.AnimationState.SetAnimation(0, "Surprised_01", false);
trackEntry.MixBlend = Spine.MixBlend.Fisrt;
//Second track : Breathing
Spine.TrackEntry trackEntry = skeletonAnimation.AnimationState.SetAnimation(1, "Idle_Neutral", true);
trackEntry.MixBlend = Spine.MixBlend.Add;

Am I doing it wrong ?
Thank you in advance. 🙂

Cheers,
Galaad

Related Discussions
...

Properties set by additive animations must be set manually or by another animation before applying the additive animations, else the property values will increase each time the additive animations are applied. Usually a track 0 animation is used to set all the properties keyed by additive animations applied on higher tracks.

Preview differs from the runtimes in that it resets the skeleton to the setup pose each frame before applying animations. We have an issue to improve Preview inside Spine to match the runtimes:
https://github.com/EsotericSoftware/spine-editor/issues/547#issuecomment-606071406

Alright, thanks for your super quick answer, Nate !
I think I'll setup an extra track 0 with just a reset animation and move the other two to tracks 1 & 2.
Have a very nice day. =D