Search Unity

Question Behaviour Trees and Mecanim

Discussion in 'Scripting' started by Freiheit314, Feb 13, 2023.

  1. Freiheit314

    Freiheit314

    Joined:
    Sep 20, 2021
    Posts:
    2
    Hi all. I recently did a course about making Behavior-Tree AI in Unity. While it's nice to see blobs moving in on the navmesh (that's what the course covered), I wonder how do I manage animation states through Behavior Trees. What would be the best practice? I'm working on a third-person adventure game with the intention of making a lot of different npcs with varied behaviors. How do I manage entering animation states and exiting whatever animation state I'm in? Should it be done through the higher-level nodes (closer to the root)? Or should it be on the Character itself, outside of the tree?

    I'm used to managing Mecanim through the parameters, rather than Animator.Play();, so I'm not sure what to do about this.