Search Unity

Animation state machine not changing while in play mode but animations playing

Discussion in 'Animation' started by Deleted User, Jan 2, 2021.

  1. Deleted User

    Deleted User

    Guest

    gosh there are such a lot of options to get wrong!

    I've set up some triggers, so that when I press "W" it goes from idle to walk, when playing this actually happens, but I can't see it change in the state machine window. and when I release "W" it goes back to idle (but not till the walk cycle has come to the end of the loop)

    Additionally I can't preview anything but the idle animation, and usually the animation preview window is empty.

    The walk animation seems to be looping back to the start rather than loop start but I can't see any kind of cursor showing me where in the animation it currently is

    I'm fairly sure I'm close to getting this but unfortunately have hit a bit of a wall with it!

    I'm using unity beta on Linux trying to animate this model https://assetstore.unity.com/packag.../fantasy/skeleton-pbr-animated-low-poly-30659
     
  2. Deleted User

    Deleted User

    Guest

    Code (CSharp):
    1.     void Update()
    2.     {
    3.         if (Input.GetKey(KeyCode.W)) {
    4.             Debug.Log("walk triggered");
    5.             anim.SetTrigger("walkTrigger");
    6.             walking=true;
    7.         }
    8.    
    9.  
    this is the behaviour code btw (edited for what I have in 2019.4 project)
     
    Last edited by a moderator: Jan 2, 2021
  3. Deleted User

    Deleted User

    Guest

    i recreated the project in 2019.4 and at least now I can see what's happening (just not how to solve it)

    Basically walk will loop only twice and at the end of the first loop idle will also play for about 3-4 frames !
     
  4. Deleted User

    Deleted User

    Guest

    okay took of a transition to anystate and it seem to be working a bit better, however idle trigger is permanently on ?

    what can cause a trigger to be always on ?
     
  5. Deleted User

    Deleted User

    Guest

    At this point although I can't be sure I think the state window not updating is todo with an issue with the beta

    as for certain triggers being on all the time I can only assume its to do with the skeleton I was trying to animate, as other characters have been a breeze to add new animation states...