Using Unity 2021.2.19f1 but this happened in many older versions.
Randomly, during play, both in the editor and the build, the Animator Controller will go back to it’s default state. No transitions are triggered, no parameters are telling it to do this, in fact all the parameters remain correct and show the state the animator SHOULD be in.
In my case, this means when triggering various state changes in the animator, for example, holding right click to go into ADS with my weapon, the animator will jump to default state, which is holstered, however the holstered bool remains false.
This seems to happen at lower framerates, or if there is a hitch during gameplay.
I can see it actually go to the entry node and transition to my default animation clip, but nothing has told it to do this, it seems very random.
I read somewhere for an unrelated topic that if the animator reaches a dead-end (i.e animator reaches a state, finishes playing but has nowhere else to go afterwards) that it might default to the Exit Node (although I think this was in a sub-state machine)
Have you ever experienced the ‘reset’ during a looping animation?
Hey! Thanks for the reply, sorry I didn’t get back sooner!
I don’t think I’ve seen this happen during a looping animation, it only seems to happen when I’m rapidly going in and out of ADS while moving.
I wonder if that combination of states is actually dead ending it in some way? It doesn’t feel like an exit node triggering, but maybe it is!
I’ll see if I can isolate that/eliminate it, if that’s it then it would be great, then I could fix it on my end! If I figure out what it is, I’ll definitely post a follow up here.
This is pretty much all that I’m calling to set these things, they are looping anims, and during low frame rate moments, (sometimes even high framerate moments) the whole animator just gets rid of it’s place and goes back to it’s entry state.
It happens exclusively when I’m rapidly entering and exiting ADS, sometimes just on the first attempt to aim down sights, sometimes after a while.
Feels like maybe there’s some other thing interfering with the animator I don’t know about.
@Flylake ! You were right all along! I found my substate had exits just fine, but after it got out of the substate, one of those exits got dead ended by exterior transition requirements!
Annoying that it took me so long to find, but grateful for your feedback, after I came back here to fuss about it, I read your post again and said, “Let’s take one more look!” Thanks again.