I’ve encountered what I think may be a bug with State Tree (but it might be intended behavior). Version: 5.3.2-0+UE5
Setup
I’ve set up this example State Tree that has 5 states:
Root
Parent State
State1
State2
State3
Issue
The issue is that State1’s transition attempts to transition into State2, but State2’s condition fails, and when it does the transition fails and returns to Root.
But if I disable State1, when State2’s condition fails, the next sibling (State3) is attempted to be selected instead.
These behaviors feel inconsistent. I feel like in the first scenario, where State1 is enabled, upon failing State2’s condition, we should attempt to select the next sibling state.
Proposed Solutions
- Keep things working the way they are with [Next State], and add an additional option for [Try Select Next State] which will move on to the next sibling state if the transition to Next State fails on that state’s conditions.
- Add a field to Transitions called On Transition Failed that allows users to select failure behavior. Options here could be similar to the options available in Transition To. In this case, we might just be kicking the can slightly further down the road, so it might still require solution 1’s implementation to fully resolve the issue.