SubTree in FSM doesn't update on Start

Forums 💬 NodeCanvas ⚙️ Support SubTree in FSM doesn't update on Start

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16691
    driiade
    Participant

      Hello,

      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.

      #16694
      Gavalakis
      Keymaster

        Hello and sorry for the later reply!

        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 🙂

        Thank you for this!

        #16693
        driiade
        Participant

          Thank you.

          And there is the same problem with NestedFSMState too.

          Hard time to find what was going on with my character bumped but also the next frame directly on slope T-T

          #16692
          Gavalakis
          Keymaster

            Hello again,

            That is true indeed. In the new version that has gone live today, both of these are fixed to work as expceted now.

            Thanks again for finding and reporting the issue!

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.