Animator Clip Wait Till Finish

NodeCanvas Forums Support Animator Clip Wait Till Finish

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #10061

    Im doing a boss FSM and I have a simple position animation in my animator. It plays the animation on a random interval but it doesn’t continue if I have wait till finish selected. The animation is not set to loop.

    #10069
    Gavalakis
    Keymaster

    Hello,

    The problem lies within the Mecanim system. If you try to play an animation state that is already the current playing animation state, then the animation won’t play again from the beggining.
    If you change between animation states, then everything will be fine.

    For example, if the animation you want to play is an “Attack” animation (non-looping) and you tell animator to play “Attack” again, it won’t happen. If though after the attack, you play an “Idle” and then “Attack” again it will play.

    It’s just how the Mecanim/Animator works. It doesn’t really have to do whether or not the animation is set to Loop or WaitUntilFinish within the NC action task.

    (I always prefered Legacy Animation :))

    I hope this helps

    Join us on Discord: https://discord.gg/97q2Rjh

    #10068

    Thanks for the quick reply. I tried using legacy but I got null reference exceptions and nothing would play. I’m not sure what I need to do differently.

    #10067

    I think it may be a 4.6 issue. T_T

    #10066
    Gavalakis
    Keymaster

    Hello,

    I’ve tested NC in Unity version 4.6. Where do you get a null reference exception?
    Can you email me a project info@nodecanvas.com so that I can take a look?

    Thanks

    Join us on Discord: https://discord.gg/97q2Rjh

    #10065

    So I can’t actually say that it’s a 4.6 problem any more but what I did was created animation for a blank sphere using the Unity animation editor. In the import options there is no option to set it for legacy. I assume that you can only use imported animations for the legacy animation system.

    #10064
    Gavalakis
    Keymaster

    Hello again,

    Now you’ve lost me 🙂

    If you want to use Mecanim (Animator), you should use the PlayAnimation action (and other actions) found under the “Mecanim” category, or else if you want to use Legacy animation, the ones found under the “Animation (Legacy)” category.

    The Legacy actions take an AnimationClip as paramter, while the Mecanim actions take a string which is the state you want to play.

    Let me know if you need more directions.
    Cheers

    Join us on Discord: https://discord.gg/97q2Rjh

    #10063

    Yes but the Legacy actions take an AnimationClip imported as Legacy as opposed to the other options of humanoid or generic. What I have found is that this animation type selection is only available on imported animations not on unity created animations.

    #10062
    Gavalakis
    Keymaster

    Hello again,

    The workaround to create Legacy animations within Unity is to FIRST add the Animation component (not Animator) and then from within the Animation Editor Window, create and edit your new Clip.

    🙂

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.