Behaviour Tree, how to use the animator Component?

Bloody Rye

New member
So I can get an object to move towards an object, but I want a character with its animator component to walk towards an object? This asset was very expensive but provides essentially nothing "Everyone" can use unless they are just trying to make a cube go towards another cube. Why is it so expensive? I simply have a character with an animator that I want to move, everything is the exact same in the tutorial with seeking the target object. Press Play, nothing happens? There is also nothing here to link an animation or use an animator component so I am completely and utterly lost here
 
Nothing at all is difficult about the concept, but there is next to no documentation on how to get this to work with characters or just the simple basic things that people want to use this for that aren't moving cubes towards other cubes. How do I get a character to walk when it is moving with animations? How do I get that character to perform actions at its location? How do I do anything with this system that only explains how to move cubes to other cubes or set up its own very expensive Opsive controller?? Ridiculous
 
I believe that I replied to your email, thanks for posting it here. I'll copy my response to your email:

There isn't a generic tutorial on this because it really depends a lot on how you have your agent setup and that is dependent on each game. Behavior Designer is a generic behavior tree framework and while that is great for extensibility it does leave a lot of options open for how to do things.

Have you seen the article at https://opsive.com/support/documentation/behavior-designer/syncing-animations/? In that article there are links to a couple of different scripts which show how you can use a NavMeshAgent with root motion. With this setup Behavior Designer doesn't even need to know anything about the animator and it makes the solution really extensible.
 
Yeah, you're absolutely fine. Thank you haha, so my own solution was to have a script that utilises the animator component by making it go towards a target. So I used that as a Seek in my own script. I then have separate behavioural tree tasks that trigger walking and sprinting with jumping over objects built in. Generally the way to do it is to just change the animator components respective blend value in the parameters and then incorporate the scripts that do that in the behavioural tree so that the AI can first check if it needs to run, if not it needs to walk etc, which can also be done with a script simply by setting the speed that triggers the walking/run animations as was in the documentation you sent over.

Just leaving this here for anyone else who is attempting to also use the animator component, thanks Justin!

Merry Christmas. ^^
 
Yeah, you're absolutely fine. Thank you haha, so my own solution was to have a script that utilises the animator component by making it go towards a target. So I used that as a Seek in my own script. I then have separate behavioural tree tasks that trigger walking and sprinting with jumping over objects built in. Generally the way to do it is to just change the animator components respective blend value in the parameters and then incorporate the scripts that do that in the behavioural tree so that the AI can first check if it needs to run, if not it needs to walk etc, which can also be done with a script simply by setting the speed that triggers the walking/run animations as was in the documentation you sent over.

Just leaving this here for anyone else who is attempting to also use the animator component, thanks Justin!

Merry Christmas. ^^
Thanks. This exactly where I am at and I am trying to fit the pieces together. There are so many controller's out there and I am hopeful (however unsuccessful) to call one of them (Malbers, Emerald, etc).
 
Thanks. This exactly where I am at and I am trying to fit the pieces together. There are so many controller's out there and I am hopeful (however unsuccessful) to call one of them (Malbers, Emerald, etc).
It is very very frustrating to get started, Behavioural Designer is very good because it gives you a lot of freedom, it has a lot of compatibility but if you don't understand what anything means its really difficult and unusable to some degree just because the tutorials are quite bad for this particular area. However, once you are forced to understand how to set up an animator on your own, how to blend animations its fine.

I use ChatGDP for example with my coding, I can make it create behavioural designer tasks. You just need to know how to word it.

Again here, what I have opted to use and HOW I have actually got this working is by going into the Animator, setting up the Parameters that need to be called so Speed, MovementType and so on. Then setting up Custom Behaviours that set MovementType to 1 "Walk" and another Custom Behaviour that sets MovementType to 2 "Run" to then set them up in the behavioural tree based on whether it needs to seek a target that is further away or get to somewhere urgently. So generally that's how you need to do it.

OR

The other way you could do it is with Speed for example, so if Speed is = 1 then it will set the MovementType Parameter in the Animator to 1 to trigger the walking animation and so on.

I had next to no idea how to really work with the Animator so understanding that is the most important thing. It varies from project to project and how you are using the animator but yeah, I would really like a PROPER tutorial on this specific issue that I think a lot of us are facing. It is a great system, but it's just been put on the store, kind of just left there without any pro-active tutorials or use-case tutorials etc...
 
Thanks. This exactly where I am at and I am trying to fit the pieces together. There are so many controller's out there and I am hopeful (however unsuccessful) to call one of them (Malbers, Emerald, etc).
This is a Video for Playmaker but it shows you how to set up an Animator Controller so the things you should be calling in your Custom Scripts in Behavioural Designer to make the Animator do an Action.


Goes straight into how to set up an Animator Controller, how Parameters work. How to Map things like walking and Attacks etc. So from there once you know the things you want to take control of, you will generally know how to call them. The Only issue is that I THINK Behavioural Designer has to work with NavMesh Agents so it has to kind of synchronise with that, so after this is set up its down to you to dictate how that works, which there is better documentation on from Unity and others like using Rootmotion and so on.

but yeah as you can see, where there are no decent tutorials on how to do this stuff, you have to go all over the place looking for possible ways to make things work.
 
I believe that I replied to your email, thanks for posting it here. I'll copy my response to your email:

There isn't a generic tutorial on this because it really depends a lot on how you have your agent setup and that is dependent on each game. Behavior Designer is a generic behavior tree framework and while that is great for extensibility it does leave a lot of options open for how to do things.

Have you seen the article at https://opsive.com/support/documentation/behavior-designer/syncing-animations/? In that article there are links to a couple of different scripts which show how you can use a NavMeshAgent with root motion. With this setup Behavior Designer doesn't even need to know anything about the animator and it makes the solution really extensible.
Hello Justin,

I too am having trouble following the process for syncing animations. The syncing article is not very long and the mechanism article is ten years old. I am just looking for some tutorial that bridges the animator controller and where I am supposed to tell behavior tree to identify which animation is playing at a certain time. I have a pretty complex blend tree with my animation that works find with the character controller, but I want to bring this same functionality over to my NPC. I have pretty much purchased everything from opsive. Unfortunately, less than a year after purchasing the Ultimate Character controller, a new version was released and to my surprise the old one is no longer supported and is deprecated...that is kinda pissing after pumping hundreds into your assets.

I have the deathmatch AI kit. If I could dissect it to see how the animation controller connects to the Behavior designer script that would also be helpful.

Your assets seem nice and have a lot of potential, but if I can use the stuff I currently purchased, what is the point in updating to a new version. Tutorials help you to get to the next level. They make your product more accessible, and accessibility means more purchases. Heck, even if you did a video linking the free asset starter kit animation controller to a behavior tree, would likely trigger a bump in sales from people like myself that are hobby coders.

Any help would be appreciated.
 
Top