Search Issue Tracker
By Design
Votes
15
Found in
2017.3.1p4
Issue ID
1016530
Regression
No
Animator transition parameter is ignored in a transition from entry to another state and animator transitions to a default state
To reproduce:
1. Open the project, attached by the tester (link in edit)
2. Open the "BugTest" scene
3. Select the Third Person Controller object
4. In the Animator window, go to Wrapper -> Locomotion -> Locomotion States
5. Enter Play mode
6. Left click inside the Game view and observe where the transition goes in the Animator window
Expected: the transition parameter in a transition form Entry to another state is not ignored and in the case where parameters are correctly set for the animator to transition to a particular state, it should transition to that state instead of the default state
Actual: when a state in a sub-state machine exits via exit state and that sub-state machine doesn't have a direct transition to another sub-state machine, animator ignores other transitions from entry and just transitions to a default state
Reproduced in 2017.1.3p3, 2017.2.2p3, 2017.3.1p4, 2017.4.1f1, 2018.1.0f1, 2018.2.0a8
-
AnthonyOvermatch
Oct 27, 2022 15:52
Also running into this issue. Really? As designed? What is the point of setting alternate transitions from the Entry node if they will never resolve?
How about checking non-default transitions first and then defaulting only if none of their conditions pass?Unity AnimatorControllers have been nothing but frustrating to use and to organize. Many people just straight up don't use them and code all of their animation transitions, which I'm on the verge of deciding to do myself.
I try to use the Any, Exit, and SubStates, in hopes that some things can be simplified, but no... I just end up having to create a connection from every single state resulting in the horrible Animator Web that we all know.Seriously, try working on anything with animations and states more complex than Walk, Jump, Attack.
-
ARRAYEWHY
Aug 07, 2021 18:44
Still happens with version 2019.4.19f1 in 2021.
-
The_MrX_
Jun 04, 2021 13:04
Why is this intended by design, this is beyond dumb...
So now in every sub state machine I use, I'm going to have to set a animation to play before exit?
Like common, that is beyond absurdly limiting and makes me just want to find a replacement animation system.
I see no reason why this limitation should exist....
-
Gstewart
Feb 09, 2019 00:38
I'm having the same issue. It somewhat defeats the point of the entry state on the base layer if it can only go to the default. It simply does not function in the expected useful way.
-
evand
Nov 07, 2018 17:45
Please re-open and fix this. We either need a glitched animation for one frame or to have dozens of manual transitions to make animations work. This breaks substates almost entirely.
-
boutinma
Oct 23, 2018 17:47
I totally agree with NEPOEZ.
-
nepoez
Oct 02, 2018 02:19
This problem is causing some real bad results. It would be real nice to fix this. The Animator would be better off if it had no default state! Or else just let the conditions take priority. Please fix this!
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Fix for 6000.0.X: Universal 3D Sample project template takes a very long time to build.
- Crash on RaiseException when terrain detail instancing is excessive
- Prefab variant reference is lost when assigned by click-and-drag in Prefab Editor mode
- Opening any dropdown in Shader Graph stops the Nodes preview but it still plays in the background
- GPU utilization increases when a GameObject is selected
Resolution Note:
This behavior is actually by design.
Here is what's happening:
When there is no transition at the exit of a sub-state machine (like in Weapon here), it selects the default state of the sub-state machine (the state at the end of the orange transition from the sub state machine entry) which, in this case, is Locomotion > Locomotion States > Relax.
Said more generically, take two sub-state machines A and B. A contains B.
If a state in B transitions to Exit, then it goes back to A. If, in A, B is not linked to anything, then the state machine has to find something to do.
The behavior in that case is to take the default state of A (the orange transition from Entry). It finds the state at the end of the orange transition, i.e. it doesn't tests the transitions in the Entry nodes.
To fix this problem, ensure the sub-state machine transitions to something, so that the state machine doesn't have to find a default state that is probably not the one you want.