• Unity
  • Odd behavior when blending some animations

Related Discussions
...

I am using Mecanim to blend animations based on the slope my player stands on. It has been working fine so far, until I added animations for landing my downward sword attack. The problem is illustrated in the video link below. The "legs" portion of the character is fine but the sword gets rotated in odd ways when standing on a slope. To troubleshoot the issue, the 3 animations I am blending are all keyed in the same way, except the "legs". I tried unchecking "auto reset" in the animator inspector window which actually fixed the issue but it made the rest of my animations not blend/transition properly so that won't work here. I also found a forum post referencing AnimationTools.MatchAnimationTimelines. I tried to implement that but was not successful (the animations were invisible and flashed in and out of sight...very odd). Any insight on how to fix this issue would be much appreciated, as I feel like I'm out of options. Thanks.

Video link: Spine Unity Project - Mecanim blend issue - YouTube

Oh, and if it matters, I am using runtime version 3.6.

Since you are using runtime version 3.6, you could give the latest 3.6 unitypackage a try [http://esotericsoftware.com/spine-unity-download]. We have very recently fixed a bug related to mecanim animation transition interruptions, which might be the cause of the weird behavior you're seeing.

Thank you for the reply @Harald. I will give that a shot and see if it works.


FYI, getting the latest 3.6 unitypackage didn't work. I'm still having the issue where the sword object is rotated randomly during the downward attack animation. I will continue to investigate and post a solution if I can find one.


Okay, so I got it to work. For every animation, I had a keyframe for every bone on the first frame but did not for the last frame. I added a keyframe at the end of every animation and then turned off "Auto Reset" in the inspector window for the animator. That did the trick. Hopefully, this helps someone else out there and saves them a little bit of time!

Great to hear you could fix it!