On NestedBTState OnEnter you don’t Update the graph 1 time.
Causing some strange behaviours when you expect the subTree to run one time before checking conditionTask.
Typically what I have :
[attachment file=”jumpState.PNG”] A Jump SubTree for jumping (JumpState.PNG). This state is exit when I’m on ground.
[attachment file=”JumpState2.PNG”] What it look like in the Jump SubTree (JumpState2.PNG).
If the Tree is not updated one time before checking condition : I will never Jump !
Maybe we can improve this ?
My Solution was : (code.PNG)
[attachment file=”code.PNG”]
Adding An update on Enter. But this will maybe break other NodeCanvas user games.
Thank you for the issue noted. Indeed your solution is fine and correct. OnUpdate should be called (like you do), just like it is called in the OnExecute of other FSM states as well (like for example ActionState.cs). I just made this change as well by the way 🙂