Why is my AI enemy slide to me with no animation

So I was applying a tutorial online and I have this problem I tried more than once and re-started but the same result. The enemy was supposed to chase the hero, while he actually chases me but he doesn’t chase with the walk animation he just slides within the x and y. (I’m using AI move to.)
Here’s a screenshot: https://i.gyazo.com/b60149063a12c859b807cd94441ea6c3.png
I hope you can help me and Thanks for your time ^^

1 Like

Does your character have An animbp? Which works with your skeletalmesh?

Yes, even tried with a simple copy of the player character with it’s animbp which works fine but with the enemy it doesn’t.

Can I see the code that you use to move it?

I think you should remove all of the player input in the AI class.
So try to delete the events: InputAxis LookUp; InputAxis Turn; Input Axis Move Forward; InputAxis MoveRight. With everything atached to it. That should do the job (I hope Xd)

Sure thing here’s the simple chaser script:

( The hero is called Trailer Hero )
And here’s the rest of the script left: https://i.gyazo.com/be1c7798241c89834a8071b69933e2f4.png
And Thanks for taking time to help :slight_smile:

Sorry for not mentioning that, I already tried doing so but no results at all.
I Finally solved with the animeBP, somehow in the tutorial it worked for him without tweaking the animeBP. I just had to change the cast to.

You should have a 2D-space animation connected to the velocity movement in the AnimationBP. This simply checks each tick what the velocity is of the character and sets this as a variable for the 2D space to decide if the character is standing still, moving slowly (walk) or quick (run).

So those screenshots you showed, doesn’t actually show how the animation has been setup.
You can follow this tutorial series which explains more in depth how the animations work and how they are used:

Thanks I’ve already fixed it. But It’s only working with my hero character
Now that I’ve a character that I imported it with the animations and It’s working good but I can’t figure out how to make it chase the player? I tried doing it just by duplicating the hero character and change a few things and it worked as stated above but how can I do it with my custom character. Somehow I couldn’t find a video explaining it, all they use is the 3rd person template character.

  1. Import character as skeletalmesh with textures and animations.
  2. Change skeletalmesh to your skeletalmesh inside the BP Class.
  3. Change the animation BP to yours in BP Class.
  4. Done

The problem I’ always having is within the animation BP I believe! It’s weird that every time I try with the main character it works but never with the other enemies :slight_smile:

can you tell me what you changed to the cast to? I have been having this issue with the paragon assets that Epic gave away for free. As a player character they work fine, but as AI, they just slide around.

this is a link to an explanation about how to fix this issue

3 Likes

I have the same Problem

solution is there

Same problem here

1 Like

I solved this problem with UE5.
I have prepared a training video below.
I hope it helps those in need.

2 Likes

how did you solve the movement animations (walk run) for the AI. Where in the video you have did this?

If you watch from the 3:30th minute of the video, I added a boolean value to the animation plan.
The UE5 animation plan controls the vector values of the character.
But your AI behavior can’t detect it either.
We need to separately tell the animation plan that the AI character is moving.
I don’t know if there is another way but it works fine this way.

I solved this issue by enabling “Use acceleration for paths” under the character movement component of the AI BP, then duplicated the animation blueprint and changed the cast after the initialization from ThirdPerson BP to the Npc one.

9 Likes