# AI playing the walking animation when not moving

**URL:** <https://forums.unrealengine.com/t/ai-playing-the-walking-animation-when-not-moving/768150>\
**Category:** AI\
**Tags:** ai-navigation, artificial-intellige, unreal-engine, question, Blueprint\
**Created:** [February 10, 2023, 4:33pm UTC](https://forums.unrealengine.com/t/ai-playing-the-walking-animation-when-not-moving/768150 "2023-02-10T16:33:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![M33TO1H1N](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@M33TO1H1N](https://forums.unrealengine.com/u/M33TO1H1N)\
**Post date:** [February 10, 2023, 4:33pm UTC](https://forums.unrealengine.com/t/ai-playing-the-walking-animation-when-not-moving/768150/1 "2023-02-10T16:33:42Z")

</div>

Hey! I have an issue with my AI, to which I can’t seem to find a fix for. For some reason, the AI plays a walking animation even though it doesn’t move.

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/8/f18eb918dac8f3bb68d2bef315cbe853af98fdc1.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/8/f18eb918dac8f3bb68d2bef315cbe853af98fdc1.mp4)

Everything should be fine in the AnimBP as well, I’ve made sure that there are no mistakes with the blendspaces or the movement states.

 ![kuva](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/6/906c5c90324bae737bbc1f8f2ed83af99428aa5c.png)

It’s also fine inside the character BP but if I launch the game, it just plays the walking animation in place for some reason.

 ![kuva](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/b/30b18432767c6d6e2050102e7f515d1b1278ff44.jpeg)

I’m suspecting it has something to do with my behavior tree or the nav mesh, although I’m pretty sure everything’s alright there as well.

If anyone has a possible explanation for this, I’d appreciate it, thanks.

---

<div class="post-metadata">

**Author:** ![M33TO1H1N](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@M33TO1H1N](https://forums.unrealengine.com/u/M33TO1H1N)\
**Post date:** [February 10, 2023, 5:07pm UTC](https://forums.unrealengine.com/t/ai-playing-the-walking-animation-when-not-moving/768150/2 "2023-02-10T17:07:03Z")

</div>

Bumping this, because I could really use some help with this one

---

<div class="post-metadata">

**Author:** ![Detach789](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Detach789](https://forums.unrealengine.com/u/Detach789)\
**Post date:** [February 10, 2023, 5:38pm UTC](https://forums.unrealengine.com/t/ai-playing-the-walking-animation-when-not-moving/768150/3 "2023-02-10T17:38:34Z")

</div>

This could be several different things.

First of all, I would hook your speed variable up to a print string to see if it _thinks_ it is moving.

-If speed is at 0 and it is animating a run, then I would go into your state machine and check for any issues there.  
-If speed is significantly over 0 even when the character is in place, then it might be the navigation.  
-If it is just being nitpicky and speed is at .00001 or something, I believe there is a node for that to fix it. You can plug in a “roughly equal” node of some sort rather than a perfect greater than node, but I don’t remember the exact name of it.

---

<div class="post-metadata">

**Author:** ![M33TO1H1N](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@M33TO1H1N](https://forums.unrealengine.com/u/M33TO1H1N)\
**Post date:** [February 10, 2023, 5:59pm UTC](https://forums.unrealengine.com/t/ai-playing-the-walking-animation-when-not-moving/768150/4 "2023-02-10T17:59:55Z")

</div>

I found out what caused it. I hooked up my speed to a print string and noticed how weird the results were. Turns out I accidentally put get actor location instead of get velocity in the animBP when calculating the speed, dumb me. Thanks for the help.
