Search Unity

Sub state machine default transition takes precedence over the other possibilities

Discussion in 'Unity 5 Pre-order Beta' started by Tabemasu-Games, Jan 29, 2015.

  1. Tabemasu-Games

    Tabemasu-Games

    Joined:
    Jul 25, 2014
    Posts:
    3
    In my Sub state machine, I have 4 states: hit_front, hit_right, hit_back and hit_left.
    I choose which state I want to go to by modifying a integer parameter, "hitSide" (from 1 to 4, each of the 4 transitions has "hitSide", "Equals" and respectively 1, 2, 3 and 4).

    The problem is that whatever the value of hitSide is, the default transition will always prevail and activate, always going to the default state (here, hit_front).

    I though this transition was used when no other transitions were possible, but it does not seem to work that way.
    I'd like to remove this default transition if possible. How can I achieve that?

    defaultTransition.PNG
     
    Damjan-Mozetic likes this.
  2. HarryCodder

    HarryCodder

    Joined:
    Feb 20, 2015
    Posts:
    67
    I'm having the exact same problem and can't find a way around it.

    I've got a sub machine state with two idle animations in them and when the state loops on itself, it always plays the default animation. On another machine state that does not loop on itself, the same behaviour works fine.

    It's probably a bug.
     
    Last edited: Mar 3, 2015
    Damjan-Mozetic likes this.