UpdateGraph() with deltaTime manually

Forums 💬 NodeCanvas ⚙️ Support UpdateGraph() with deltaTime manually

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16067
    jacob
    Participant

      When I use custom deltaTime to call UpdateGraph(deltaTime),  the nested graph can’t apply this deltaTime.  so I modify source code to fit my requirement just like this:

      currentInstance.UpdateGraph(this.graph.deltaTime);

      Modified files:

      NestedFSM.cs line 41

      NestedFsmState.cs line 42

      NestedDT.cs line 37

      SubTree.cs line 34

      I think this is a bug ? or I didn’t think about it enough?

      #16068
      Gavalakis
      Keymaster

        Hello there and thanks for your input.

        Passing “this.graph.deltaTime” in subgraph Update call is actually a correct change in case you need to access deltaTime of subgraphs. However, if there is no need to know subgraph deltaTime, then it is not really important since the subgraphs are updated only when their parent graph is updated eitherway. However, your change is more correct and I will also make that change officially.

        Thanks! 🙂

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