Forum rules - please read before posting.

Custom animation stuck after update

Hi,
i've some trouble with my game after the lastest update... suddenly, "Wait until finished" option in "Character -> animate -> play custom" action doesn't work again. The animation stop at last frame and the character stuck in this position. I've remaded the player character from scratch, the same problem arise when a custom animation is called. Please, i need some help there!

Comments

  • What animation engine does your character use, and what are the exact settings for your Action? Any related screenshots you can share of the Action, the character and their Animator will help me understand the situation.

    If this is for a Sprites Unity character, are you checking "Return to idle after?" in the Action? It would be expected that the character would remain in the animation's last frame, otherwise. Or is the issue that the Action itself continues to run indefinitely?

  • edited November 2021

    Hello,
    I'm using "Sprites Unity" engine. I think that the Action itself continues to run indefinitely, because the game stuck and doesn't give me back the control of the character (it remains in "cut scene mode" i suppose, because the other animations presents in the scene continues to run normally, and if i uncheck the "Wait until finished" flag the character works as aspected). Here some screenshot of the character, animator and an example of one action that stuck the character:

    https://ibb.co/qn1xQy2
    https://ibb.co/5jJL0Rk
    https://ibb.co/WnT05w0
    https://ibb.co/khkgz6C

  • I've made some tests, the problem seems related to the "Add directional suffix" flag, if the flag is unchecked, the animation ends then the character returns to his correct "idle" animation....

  • Thanks for the details and test results - I believe I've found the problem.

    Open up AC's AnimEngine_SpritesUnity.cs script, and replace line 421:

    if (action.method == ActionCharAnim.AnimMethodChar.PlayCustom && character.GetAnimator ().GetCurrentAnimatorStateInfo (action.layerInt).shortNameHash != Animator.StringToHash (action.clip2D))
    

    with:

    if (action.method == ActionCharAnim.AnimMethodChar.PlayCustom && character.GetAnimator ().GetCurrentAnimatorStateInfo (action.layerInt).shortNameHash != Animator.StringToHash (clip2DNew))
    

    Does that fix it?

  • Yeah! Now it works perfectly! Thanks!
    Grazie!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.