WARNING! If you Duplicate the Character Blueprint your Character WILL not Motion Match because the Motion Matching Animation Blueprint is Casting to a DIFFERENT Blueprint.
Just finished watching one of the hacky videos and then when I saw yours I thought, "Oh of course Unreal DevOP has a better method!" Thanks for this, I was about ready to give up on using the MM character for my ai.
Thank you very much for this helpful video. Your explanation greatly simplifies the implementation of AI for character movement. I especially appreciate the clarity on using "Acceleration for paths" and setting up the AI controller. It would be great to see more videos like this, perhaps on integrating behavior trees using Motion Matching. Your straightforward approach is very instructive.
Yeah I may be doing more videos like this in the future but honestly I will probably be doing them around State Trees. State Trees are going to be the way to go, they are modern and Behavior Trees will never be as Flexible as State Trees have already become.
@@unrealdevop Thanks for the insight! As a beginner in Unreal Engine 5, I wasn't aware of State Trees. Now that you've mentioned them, I'm very interested in learning more. It would be fantastic to see videos about this modern approach. Looking forward to your future content! Best regards.
@@ganzukc2676 Yeah I have a series where I go over a really complex combination of State Trees and Smart Objects. I did have to use a few hacks to get things working though because in 5.4 there are still several issues that I believe should be mostly worked out now in 5.5
This is great work, thanks!You can also use behaviour trees. Question: Any ideas on how to make the ai change from run to walk or the other way when moving from one place to another? I am trying but i can’t figure it out. I can only change it manually from get desired gait function but he will either walk or run in general. He doesn’t change when going from one place then chasing player.
Yeah this video was only meant to really show people how to make them move properly and less about setting up Ai Logic. Personally I prefer State Trees, I find them more straight forward and flexible but that's just my preference. As far as changing the gait that's a logistical problem that entails changing their movement speed and animation on their AnimGraph when their movement speed falls within a certain range.
Just as a side note: Most people making these projects are focused on quantity over quality. They are more about the Wow factor and drawing people in, but when you open up their logic you realize it wasn't really thought out and they were just slapping stuff together as fast as they could without putting any real thought into it. Also I've been really busy and going through a bit of burn-out so I'm still struggling to find both the time and desire to work on this project further.
Yeah so some people will tell you to use Behavior Trees, I've had experience with both....and I'll tell you now that Behavior Trees are very RIGID and difficult to perform Parallel Processes together, there are a myriad of approaches to doing that with Behavior Trees but a lot of them are rather hacky and the Simple Parallel that is provided with them does not work for every situation and will bug out if you try to use it in certain ways.....the point is that it's ability to run things in Parallel is very limited. State Trees are modern and designed around Modern Needs, they don't have any of the Weaknesses that Behavior Trees have and are far more flexible because of that. You can run Multiple things in Parallel from my Understanding (I Have not fully tested the extent of this quite yet). In a State Tree you would have the Parent of the Attack run the MoveTo function and a child of it would execute the Attack Logic.....you could also have an Entirely Separate State Tree Performing Movement Functionality and run it as a Parallel Tree that executes while doing other things under it. This is something that would cause all kinds of conflicting problems were you to try doing it in an Archaic Behavior Tree.
Just to clarify it a bit more from my last statement. In regards to Behavior Trees - you can run things from a service....and some people opt for Behavior Tree / Blueprint Separated Logic for handling Parallel. I personally don't like that Separation that is required for handling things that the structure and design of Behavior Trees simply fail to achieve on their own. That is why I have chosen to Abandon Behavior Trees and Go all in on State Trees. If you have ever tried to develop a sophisticated Cooldown based system with Behavior Trees you'll begin to understand the real limitations of the Behavior Tree.
I'm assuming your using an altered version of the Game Animation Sample Project. I did this in an Unaltered version, I did try this again today in an Altered version and it did what you are describing. I'll try and recreate this again to make sure it's working and that I didn't leave something out and I'll try to figure out what may be causing it to not work.
I looked into it and accidentally fell into the same trap you apparently did. I assume you DUPLICATED the Character Blueprint....this is a Mistake, the Animation Blueprint is Casting to the other Blueprint and so it will always fail. That's why your character is sliding, it happened to me too and it took me like 30 minutes to realize why....this is why I hate it when people Cast to Blueprints.
@@Uchidan There are a few ways, you could setup a Blueprint interface to pass all the data needed from the reference to the Animation Blueprint, removing the need for a Direct Cast and therefore removing it's dependency on a specific Blueprint....or you can duplicate the Animation Blueprint and replace it's Direct Cast to the CBP_SandBoxCharacter with the one you duplicated....if you do that though then you will also need to duplicate the Choosers that are evaluated because they directly reference the ABP_SandBoxCharacter animation instance and so you'll need duplicates of them that point to the correct Anim Instance so that later when you try to compile it or run it outside the editor your AnimBP's don't stop working for some odd reason.....because the thing they are referencing isn't the thing that is being passed to them for Chooser Evaluation.
WARNING! If you Duplicate the Character Blueprint your Character WILL not Motion Match because the Motion Matching Animation Blueprint is Casting to a DIFFERENT Blueprint.
That one checkmark saved my life!
Just finished watching one of the hacky videos and then when I saw yours I thought, "Oh of course Unreal DevOP has a better method!" Thanks for this, I was about ready to give up on using the MM character for my ai.
Yeah I originally looked around seeing if someone had figured it out but then came across a twitter tip that I looked into and it turned out to work.
Thank god i found this. Saved me a lot of headache. Good video !
Thank you very much for this helpful video. Your explanation greatly simplifies the implementation of AI for character movement. I especially appreciate the clarity on using "Acceleration for paths" and setting up the AI controller. It would be great to see more videos like this, perhaps on integrating behavior trees using Motion Matching. Your straightforward approach is very instructive.
Yeah I may be doing more videos like this in the future but honestly I will probably be doing them around State Trees. State Trees are going to be the way to go, they are modern and Behavior Trees will never be as Flexible as State Trees have already become.
@@unrealdevop Thanks for the insight! As a beginner in Unreal Engine 5, I wasn't aware of State Trees. Now that you've mentioned them, I'm very interested in learning more. It would be fantastic to see videos about this modern approach. Looking forward to your future content! Best regards.
@@ganzukc2676 Yeah I have a series where I go over a really complex combination of State Trees and Smart Objects. I did have to use a few hacks to get things working though because in 5.4 there are still several issues that I believe should be mostly worked out now in 5.5
looking great dude! thanks for the share!
Yeah for sure, appreciate your feedback.
Thank you very much for this video!
This is great work, thanks!You can also use behaviour trees. Question: Any ideas on how to make the ai change from run to walk or the other way when moving from one place to another? I am trying but i can’t figure it out. I can only change it manually from get desired gait function but he will either walk or run in general. He doesn’t change when going from one place then chasing player.
Yeah this video was only meant to really show people how to make them move properly and less about setting up Ai Logic. Personally I prefer State Trees, I find them more straight forward and flexible but that's just my preference. As far as changing the gait that's a logistical problem that entails changing their movement speed and animation on their AnimGraph when their movement speed falls within a certain range.
this is cool man, but you could also make it so that you can switch from first person/third person, and also have a choice of different weapons
Yeah a lot of people seem to want first person. I've mostly been focusing on working out all the problems with the system before expanding it.
Just as a side note: Most people making these projects are focused on quantity over quality. They are more about the Wow factor and drawing people in, but when you open up their logic you realize it wasn't really thought out and they were just slapping stuff together as fast as they could without putting any real thought into it.
Also I've been really busy and going through a bit of burn-out so I'm still struggling to find both the time and desire to work on this project further.
Just realized you weren't referring to my DAO Project
wow no fucking way......that easy? thank you man but how would you have them follow but at the same time attack a target? im knida new to unreal
Watch some tutorials about behavior trees and ai controllers, they will help.
@@0UTSIDER thanks.
Yeah so some people will tell you to use Behavior Trees, I've had experience with both....and I'll tell you now that Behavior Trees are very RIGID and difficult to perform Parallel Processes together, there are a myriad of approaches to doing that with Behavior Trees but a lot of them are rather hacky and the Simple Parallel that is provided with them does not work for every situation and will bug out if you try to use it in certain ways.....the point is that it's ability to run things in Parallel is very limited.
State Trees are modern and designed around Modern Needs, they don't have any of the Weaknesses that Behavior Trees have and are far more flexible because of that. You can run Multiple things in Parallel from my Understanding (I Have not fully tested the extent of this quite yet). In a State Tree you would have the Parent of the Attack run the MoveTo function and a child of it would execute the Attack Logic.....you could also have an Entirely Separate State Tree Performing Movement Functionality and run it as a Parallel Tree that executes while doing other things under it. This is something that would cause all kinds of conflicting problems were you to try doing it in an Archaic Behavior Tree.
Just to clarify it a bit more from my last statement.
In regards to Behavior Trees - you can run things from a service....and some people opt for Behavior Tree / Blueprint Separated Logic for handling Parallel.
I personally don't like that Separation that is required for handling things that the structure and design of Behavior Trees simply fail to achieve on their own.
That is why I have chosen to Abandon Behavior Trees and Go all in on State Trees. If you have ever tried to develop a sophisticated Cooldown based system with Behavior Trees you'll begin to understand the real limitations of the Behavior Tree.
Nope. Character just slides around, doesn't perform animations.
Odd, seems that it works for everybody but you.
I'm assuming your using an altered version of the Game Animation Sample Project. I did this in an Unaltered version, I did try this again today in an Altered version and it did what you are describing. I'll try and recreate this again to make sure it's working and that I didn't leave something out and I'll try to figure out what may be causing it to not work.
I looked into it and accidentally fell into the same trap you apparently did. I assume you DUPLICATED the Character Blueprint....this is a Mistake, the Animation Blueprint is Casting to the other Blueprint and so it will always fail. That's why your character is sliding, it happened to me too and it took me like 30 minutes to realize why....this is why I hate it when people Cast to Blueprints.
@@unrealdevop Is there a way to fix it? Or a work around?
@@Uchidan There are a few ways, you could setup a Blueprint interface to pass all the data needed from the reference to the Animation Blueprint, removing the need for a Direct Cast and therefore removing it's dependency on a specific Blueprint....or you can duplicate the Animation Blueprint and replace it's Direct Cast to the CBP_SandBoxCharacter with the one you duplicated....if you do that though then you will also need to duplicate the Choosers that are evaluated because they directly reference the ABP_SandBoxCharacter animation instance and so you'll need duplicates of them that point to the correct Anim Instance so that later when you try to compile it or run it outside the editor your AnimBP's don't stop working for some odd reason.....because the thing they are referencing isn't the thing that is being passed to them for Chooser Evaluation.