We have a behavior sequence prefaced by a couple of animations. This sequence can run for thousands of frames. Imagine a group traveling along a path to target destination several hundred position units away. Calling the Animator repeatedly through this sequence is wasteful,so, utilizing the Filter decorator works perfectly, once. This sequence is in a BT which is always on. My understanding is that the decorator will not reset unless the BT is stopped or assumedly disabled. The sequence is contained in a sub-tree with the mentioned BT but I’m not sure the decorator is watching the state of the sub-tree but in fact just the parent BT.
Am I interpreting this correctly. What is we are trying to accomplish is talking to the expensive Unity Animator is few times as conceivable. I’ve seen a couple of forum references to this topic but was what design alternatives we might have. I think, if possible, the suggestion would a very significant optimiztion resident in NC.
Considering I understood your question correctly, if you want to make something happen less frequently, you can use the Filter Decorator set to Cooldown mode. Doing this will make the decorated child execute only every x seconds. instead of every update tick. Have you tried this, or is there any issues you faced by using this?
What I am struggling to understand is what event resets the access count when “Limit number of times” is chosen. It was thought (i.e. us) that it would reset when the sub-tree was inactivated (meaning that a different sub-tree within that behavior tree) was active. Is this the correct understanding. If not, what would reset it to 0?
Hello again and sorry for the late reply!
The access count is reset whenever the master parent/root BT is started/restarted.
So a SubTree’s Limit Decorator accessed times, will reset when the parent/root BT of that SubTree is started/restarted as well.
Basically a SubTree works like if all the nodes in that sub tree, were part of the same root BT.
Please let me know if that helps (or if not 🙂 )
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.