It seems there is a bug with elapsedTime in nested Behavior Trees if the Behavior Tree has an updateInterval set.
This way only the last frame deltaTime will be passed to nested BT when it should pass the accumulated time since the last update.
This makes the Wait Action to run slower in the nested BT then it runs in parent BT which is not correct.
said Daniel in Discord.
In addition, the cooldown decorator also doesn’t work in a subtree for this reason you said.
It seems that the parent graph is repeatedly entering/exiting the subgraph and as a result the subgraph is reset (along with its nodes) each time it re-starts. I could probably make the Cooldown node independent of that and dependant on Time alone.
Is this feature under development?
I attached png ‘edit01’ for the elapsedTime issue and ‘edit02’ for the cooldown issue. I’m not sure whether this is the right way.
To be totally honest I was almost about to remove the “update interval” option that Behaviour Trees have a couple of versions back. No other type of graph in NodeCanvas has such an update interval and because of that (as you can see) it creates more problems than benefits (I think). Is keeping the “update interval” option critical for you and would it be a problem if it was actually removed?