Search Unity

Blend tree not applying animations

Discussion in 'Animation' started by Scrawny, Feb 19, 2014.

  1. Scrawny

    Scrawny

    Joined:
    Feb 3, 2014
    Posts:
    24
    I'm using a blend tree to control animations. When the speed is 0, play idle, 8 for walk and 12 for run. The problem is that no matter how big my speed is, all the character plays at all times is the idle animation, as seen in this picture:
    $BlendSpeed.JPG

    The blend tree clearly shows that the walk animation should be playing, and the preview for the animation works perfectly as well. I'm probably missing something really simple here, but I've already been at this for about an hour, and I'm starting to get pissed off, so... Any ideas?
     
  2. Scrawny

    Scrawny

    Joined:
    Feb 3, 2014
    Posts:
    24
    Well, after downloading Blender, learning to use the program and doing the whole goddamn rig all over again in hopes that it'd affect anything, I'm still stuck. Now it's playing the walk animation forever instead of the idle animation, though. So I don't even F***ing know. I'm, like, one step away from trashing the entire project file and starting all over again. This is my last cry for help. ANY ideas are welcome, just give me something to check for, maybe it'll snowball from there and I can figure this thing out.
     
  3. SeanHoward3D

    SeanHoward3D

    Joined:
    Dec 12, 2013
    Posts:
    19
    Hello, Just an idea but heres a checklist.
    - Is your speed parameter a public float?
    - Have you tried doing a debug log to check the current speed value?
    I need to see more though so feel free to contact me on skype so that I can investigate more. Best of luck otherwise.

    Skype - SeanHoward3D
     
    bowserscastle likes this.
  4. Alf203

    Alf203

    Joined:
    Dec 7, 2012
    Posts:
    461
    This is a long shot, but maybe you should check that your animations play properly on their own without the blend tree first.
     
  5. davidsirmons

    davidsirmons

    Joined:
    Mar 16, 2014
    Posts:
    190
    I feel your pain. I followed through the one-hour and eighteen minute long 2D Animation tutorial and had the same problem. The character was there when play button was activated, the character would correctly face the direction I made him go, but animation state was locked to whatever happened to be set as the default animation (the default is the orange animation brick in your AnimaTOR screen). That default anim would play for me constantly, with no state change from the default. I realized that their scripting still seems to lack a lot of user friendliness, since an HOUR of programming by ME...who is NOT a programmer....had to be done in order to get the godforsaken simple state change (swap from Idle to Run) to actually work. (Really, Unity Guys?) So, I hope you didn't pull your hair out from sheer frustration with the lack of 'drag and drop' functionality, which is where this engine really needs to be by now for something so simple as standard game states.
     
  6. Alf203

    Alf203

    Joined:
    Dec 7, 2012
    Posts:
    461
    I don't think that is a good excuse. Unity is not Gamemaker, you need to know some programming to make your game. Don't worry you'll become better at it with time. Triggering a change of state is something very basic. If someone can't do this how are they going to do a complete game ?

    Also you can use spaces in your text and have different paragraphs as it makes it easier to read.
     
  7. Brinstar

    Brinstar

    Joined:
    Jul 28, 2017
    Posts:
    4
    I had the exact same problem. my character move from right to left, can jump, but doesn't show the right animation (still the default one, Idle). Is someone out there that knows how to get that fix? (I'm using unity 2108 1.6f1)
     
  8. gambitslacklines

    gambitslacklines

    Joined:
    Feb 23, 2015
    Posts:
    14
    have you set your animations to loop or made sure that they have a similar length.

    All clips only would play once in the standard setup, so as soon you enter the blendtree all animations are running once at the same time, when they reach the end-frame they just stay there as long you do not exit and reenter the blendtree(as example with Transition-to-self) or set the animations themself as loops.
     
  9. sadilfh_unity

    sadilfh_unity

    Joined:
    Oct 6, 2018
    Posts:
    1
    upload_2018-10-6_17-58-51.png
    make sure "Speed" is greater then 0
     
  10. ErikUnity2017

    ErikUnity2017

    Joined:
    Feb 3, 2019
    Posts:
    1
    I had the same problem but I solved it by changing the Update Mode to Animate Physics on the Animator. upload_2019-2-3_20-46-48.png
     
    Wintermute- likes this.
  11. Drudail

    Drudail

    Joined:
    Jul 4, 2014
    Posts:
    1
    Odd as it might sound, I got it to work by exposing the Animator as a Public object and linking it through the workspace rather than using GetComponent in the script. I have no idea why it made a difference, but it did. I tested it initially by commenting out the GetComponent line, got it working, then tried doing it through code again. Whenever I used the code the sprite was locked in whatever animation it started in, but as soon as I used the inspector it would read the animation states correctly.
     
  12. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    2,429
    This worked for me with same problem. Any clue why?

    My blend tree was working fine, then I swapped the mesh out. My first test was cool, but after closing unity and opening the following day I then had this issue. Very strange.