1
\$\begingroup\$

I have this new character animation that I made in Blender. None of my other animations use Root Transform or anything fancy, and they work great. This new one is special though. The character jumps up, flips upside-down, hits his head on the ground, lands on his back, and stands back up again. See, when he stands up, he is a distance from the pivot point. I imagine that after this animation concludes, transitions to other animations are going to be buggy. Here is the animation:

enter image description here

I didn't know what to do at the end so I keyed his idle pose where the animation began. This means that for the animation to be seamless, Unity needs to know to move the character FORWARD a specific distance at the same rate that the distance between the character and the pivot point is closing, during the last 2 frames of the animation.

At this point, none of my other character animations need to be tweaked manually. What do I need to do to make sure this animation works with my other animations (walking, running, jumping, etc) so there is no jarring "snap" into position, and animations are correctly aligned?

Could I do this with an animation event? If so, how? I have never used one before.

\$\endgroup\$
  • \$\begingroup\$ Are you sure your animation needs this offset? From what I understand, during the animation the character is moving around the stage anyway. Wouldn't it be better if it ended on the same position? \$\endgroup\$ – TomTsagk Oct 30 at 12:50
  • \$\begingroup\$ the offset is automatic because he lands on his head and needs to flip over--his heels are away from his center of mass when he flips over \$\endgroup\$ – hatinacat2000 Oct 30 at 14:42
  • 1
    \$\begingroup\$ Usually offsets in animations end up with a lot of headache as it has to be manually fixed through code. Basically what you'd have to do is, apply the exact offset exactly when the animation ends, and the "idle" animation starts. This is fine for only one animation, but the more of them that have offset, the more complicated to keep track of them all. \$\endgroup\$ – TomTsagk Oct 30 at 14:45
  • \$\begingroup\$ I definitely see how this can be a pain to hook up. This animation will only play when he is ejected from another, specific scene \$\endgroup\$ – hatinacat2000 Oct 30 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.