AI Driven Locomotion with Root Motion
I want to replace my In Place animations to Root Motion for AI/Enemies. But when I do this, don't know how to handle AI movement.
Any idea for this implementation?
asked Dec 26 '14 at 12:33 PM in C++ Programming
it's so simple, make your AI Character look at Path Points instead of using Simple Move To Actor method, that way you will get use of AI Navigaiton for your AI Characters without forcing them to Move by their CharacterMovement Component, and then you will have the ability to move anywhere using root-motion method.
I made this simple blueprint, and my AI Character follows my Main Character without any intervention of CharacterMovement, only animation root-motion is driving my AI Characters ;) as you can see, I have used Find Path to Location Synchronously to get the path point Number 1 as shown...
..then I made my AI Character Look At Path Point Number 1 - we only manipulate rotation here not the movement, therefore, we can make our AI move (or jump or punch or sing whatever you like) according to his root-motion animation separately. now I could have him THINK like an AI but with root-motion movement. ;) he can find his path to the Main Character with a AI Navigation System Mind, but with root-motion movement. that's because we only manipulated his rotation. I hope this helps, and this is how I deal with my AI Characters, I never use CharacterMovement method for them.
message me if you have any questions further.
answered Jun 25 '16 at 03:06 AM
This is a very complicated matter :) To use root-motion animations for locomotion you'd need a dedicated solution for locomotion planning that would be taking a navigation path and was figuring out a combination of available animations that would more or less follow the path (or the next N segments of the path). UE4 doesn't have a subsystem like that, sorry.
answered Dec 28 '14 at 10:20 PM
You should probably drive all standard locomotion animations/blendspaces normally, eg in place with velocity and direction fed into the blendspace. Root motion will be best used for one off animations such as hit reactions or attacks.
answered Dec 28 '14 at 04:59 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here