Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug When an animation starts looping, it can't transition to a non-looping animation.

Discussion in 'Animation' started by unity_DE9CF6D67DF8F6FB59E7, Feb 14, 2023.

  1. unity_DE9CF6D67DF8F6FB59E7

    unity_DE9CF6D67DF8F6FB59E7

    Joined:
    Feb 14, 2023
    Posts:
    2
    Hello, I am trying to create a melee combat system for my game using the animator in unity 3D. So far, I have made a simple animation tree and have gotten the transitions to partially work. Here is a picture of the tree and the conditions:
    upload_2023-2-14_9-38-49.png upload_2023-2-14_9-39-16.png upload_2023-2-14_9-39-35.png upload_2023-2-14_9-39-51.png

    The animations usually transition between each other fine, but when the Idle and walking animation start looping (if you are doing these actions for an extended period of time), they don't transition to the attacking animation when the attack input is received. I am not familiar with all the animation settings, so I just want to be sure that I don't have any setting off that I need on. Thanks in advance for any help!
     
  2. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    599
    Hey,

    There isn't really much information to go on here. If you could take the same screenshots while the issue is actually occurring, that would be really helpful.

    Start your game, click on the object in the hierarchy with this animator, and take a screenshot exactly as you did here of the animator window while walking is stuck as you described.
     
  3. unity_DE9CF6D67DF8F6FB59E7

    unity_DE9CF6D67DF8F6FB59E7

    Joined:
    Feb 14, 2023
    Posts:
    2
    In this screenshot, the idle animation is looping and the attack animation can't be played.
    upload_2023-2-16_9-10-3.png

    here are the settings for the Idle Animation
    upload_2023-2-16_9-11-35.png

    Here are the Settings for the Attack Animation
    upload_2023-2-16_9-12-23.png
     
  4. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    599
    Really, what I need to see is the issue occurring with the parameters and conditions showing like in this screenshot you took earlier:

    upload_2023-2-14_9-39-16.png

    Also, make sure that you have the idle to attack transition selected so we see the correct conditions (or whichever transition isn't working).