I have an Animator that has 3 different states. Walking, Climbing, and End of Climb.

The diagram is shown below:

enter image description here

I have 2 bools, isClimbing and isWalking. When isClimbing is set to false it transitions to End of Climb. Then when I set isWalking to true, it transitions to Walking. However, when I do this, for some reason the animator starts back at Climbing then moves to End of Climb then moves to Walking.

It seems everytime I change a parameter, it completely restarts the state machine back to the default Climbing state and then moves forward.

I do not have code, and have been triggering this through the UI.

What am I doing wrong?

  • \$\begingroup\$ Try using Trigger properties instead of bool properties \$\endgroup\$ – Kevin Jul 8 '20 at 3:20
  • \$\begingroup\$ @Kevin The same thing happens. Its bizarre, even if I have a bool that is not set to any transition, but I turn it on or off. The entire animator restarts back to the default state. \$\endgroup\$ – Gary Holiday Jul 8 '20 at 3:24
  • \$\begingroup\$ When you say you "have been triggering this through the UI" do you mean you've been changing properties directly in the Editor? It wouldn't surprise me if the Editor completely resets the state machine when its properties are manipulated by the developer in this way. Can you reproduce this problem with a script that manages its own animation state properties at runtime, without manual developer intervention under the hood? \$\endgroup\$ – DMGregory Jul 8 '20 at 11:27
  • \$\begingroup\$ @DMGregory Yup, you are exactly right. That's very aggravating that the UI does that. What a terrible feature. Thanks for the clarification! \$\endgroup\$ – Gary Holiday Jul 8 '20 at 15:50
  • \$\begingroup\$ It might be necessary in some cases, since in the editor you can make changes that could put the animation into an invalid state, or have no route back to the start. In general, please always try to reproduce a problem in real gameplay as part of your regular troubleshooting procedure. \$\endgroup\$ – DMGregory Jul 8 '20 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.