Forum rules - please read before posting.

Strange random freeze/delay after running animation in actionlist

I'm experiencing a strange freeze/delay when using Character: Animate nodes in my Actionlists.

The setup of the node is like this:
image

Sometimes during runtime the Actionlist plays through without problems, but sometimes it freezes for 1-2 seconds after running the animation before proceeding to the next node.

I'm not totally sure, but the freezing only appears to be happening when 'Wait until finish' is checked.

Any ideas what could be causing this?

Comments

  • Does it happen if you run the animation in an endless loop?
  • @KevRev like if I don't have a transition back to my idle animation in my animator and set my PlayerUseLow01 animation to 'loop time', or what do you mean?
  • Try setting that animation as your default idle and just watch to see if it loops smoothly every time or whether it occasionally pauses. That can tell you if it's a problem with the animation clip.
  • @KevRev yes it loops fine. Besides, when running the Actionlist it transitions back to my idle animation just fine, but even though it has reverted back to idle, the strange freezing still occurs.
  • What about if you use the idle animation for both transitions? Does the pause still occur when transitioning from idle to idle?
  • @KevRev well, it's a bit hard to test, because the freezing only happens sometimes. Sometimes it can go a good long while without occurring, but then a wave comes on again. So far I haven't been able to reproduce the problem if I put my idle animation in the Actionlist (instead of PlayerUseLow01).

    What seems strange to me, if it should be a problem with the animation transitionings, is that when I run the Actionlist, it runs the animation and then transitions back to my idle animation as it should, and then it's actually playing my idle animation while freezing for 1-2 seconds. It's like AC is delayed in recognizing that PlayerUseLow01 has finished playing. And it's even weirder that it's only happening some of the times.
  • Do you have a transition from PlayerUseLow01 -> Idle, or just relying on revert to idle? How are you transitioning from idle to PlayerUseLow01? Are you triggering the custom animation manually or making use of variables so the animation controller controls the switch? I was thinking last night that perhaps there is a conflict on the transitions, so when trying to determine how to get back to idle, there's a momentary blip. Could you provide screenshots of all the transition properties and a view of the controller?
  • I have a transition with exit time from PlayerUseLow01 -> Idle. I don't have a transition the way around, as I'm using the Actionlist to 'Play custom'. Like I said before, it seems to be transitioning back to Idle just fine, and the freezing is happening AFTER it has transitioned back to Idle. It would make more sense to me, if it got stuck on PlayerUseLow01 while freezing.

    My animator looks like this:

    image

    And this is inside my Blend Tree:

    image

    Let me know if you need views of anything else, and thank you for taking time trying to help me :smile:
  • Ok, I haven't experimented with blend trees yet so not sure if my suggestions will be relevant. Could you try deleting the transition from PlayerUseLow to Idle and then in the action list, straight after the action that plays the playeruseLow, play animation:set to idle. See if it still does it if you manually control the change of animation to idle (you'll lose any blending for the moment, but this is just for testing purposes. Is it possible to capture a video of it happening? If you press Windows-G in Unity, you can use the Xbox game recorder to record what's happening and upload to YouTube.
  • AC's way of checking if an "animation has completed" is to see if it's played 98% of it.  It's not perfect, but it's traditionally very tricky to actually read Unity's Animator through script - and the results can vary, as you've seen.

    If you're having problems, I'd recommend unchecking Wait until finish?, and using an Engine: Wait Action of the desired duration instead.
  • @KevRev the freezing still occurs even when I shift back to Idle manually in my Actionlist.

    @ChrisIceBox thank you! I'll use that solution for now at least. Do you have any ideas what could specifically cause this problem? I'm thinking if there's something in my animations and/or animator that I could adjust to make it work?
  • It's not clear if 98% of your animation is able to play given the size of your transition - you can see by the image that it's kind of on the wire whether it'll play that much before moving onto the Blend Tree.  You could try upping the start time for the transition to make it more definite.
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.