Hi everyone! I’m currently working on an animator state machine and a controller script. I have a set of different idles, which I have to organize properly. So I’ve decided to create a sub-state machine, place an empty dispatcher state there and use it to control idles. The idea is simple: when we are in the empty state, a random float is calculated. According to this float we set an integer parameter to the appropriate value. This should initiate one of the transitions from the empty state to an idle. As soon as the idle finishes playing, another transition returns us back to the empty state… and so on…
In fact this structure works similar to what is expected, but my character suddenly falls through the ground and then restores his actual position - this happens very often. I suppose, this is because unity tries to play the null animation in the empty state.
-
Is it possible to make this structure work correctly?
-
How can I use empty states in mecanim without getting bugs?