AI Driven Locomotion with Root Motion

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 :wink:

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. :wink:
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.

NOTE:

  • you should make sure you get the path point number [1] from the array of Path Points, any other number will not get the desired result for your AI.
  • make sure the Filter Class in the function is set to RaycastFilter_UseDefaultArea option as shown in the first picture.
  • make sure you have generated your Navigation Mesh Bounds in the level or particularly.

message me if you have any questions further.

2 Likes