Hi!

I'm having a little issue with the victory animation. My characters are sprite that use Mecanim to swap between animations. All my other animations and the transitions between animations work perfectly.

When the battle finishes, all the characters take the victory animation but... they transition for like 1 frame to the idle animation every now and then, making the characters flash from time to time. It's like if the victory parameter was turned off for a brief moment, only to turn back on immediately after. The only thing that allows the animation to go back to the idle animation is if the parameter (bool) Victory is turned off.

I'm not triggering manually the victory parameter, I let Ork do its magic when the battle ends in a victory.

What could be the cause of that? If you require more information on how my animators are set up, just let me know.

Thanks!
  • Most likely an issue with your Mecanim animator controller. Check the transitions to your victory animation state, e.g. it should also be able to transition to itself.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited December 2022
    Aaah yeah, that's it, got it to work in two minutes.

    I never would have thought to make a state transition into itself.

    Thanks for the tip, and merry Christmas :)
    Post edited by max_power on
  • Also learned that by playing around and wondering why it behaved like that :)
    When this isn't used, the animation will transition to the default state before it can transition back to the animation (when the transition conditions still apply).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Yeah, this is not intuitive at all! I don't really understand why they would make it behave like that.
Sign In or Register to comment.