# Make AI move in a certain direction

**URL:** <https://forums.unrealengine.com/t/make-ai-move-in-a-certain-direction/472614>\
**Category:** Community & Industry Discussion\
**Tags:** direction, walk, move-to, unreal-engine, question\
**Created:** [October 8, 2020, 7:06pm UTC](https://forums.unrealengine.com/t/make-ai-move-in-a-certain-direction/472614 "2020-10-08T19:06:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [October 8, 2020, 7:06pm UTC](https://forums.unrealengine.com/t/make-ai-move-in-a-certain-direction/472614/1 "2020-10-08T19:06:47Z")

</div>

I know that I can make an AI Character move to a certain location with the “AI MoveTo”-Node but is there a way to just say “move to direction”, maybe with a vector input for the direction the character should move, to make him move to the left/right for example?

---

<div class="post-metadata">

**Author:** ![TheTallJS](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thetalljs/32/1062447_2.png) [@TheTallJS](https://forums.unrealengine.com/u/TheTallJS)\
**Post date:** [October 9, 2020, 8:50am UTC](https://forums.unrealengine.com/t/make-ai-move-in-a-certain-direction/472614/2 "2020-10-09T08:50:39Z")

</div>

theres a “move to location or actor” node that allows a vector goal location as well as actor location.

---

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [October 9, 2020, 12:41pm UTC](https://forums.unrealengine.com/t/make-ai-move-in-a-certain-direction/472614/3 "2020-10-09T12:41:49Z")

</div>

Thanks for your answer. But what I need it is not a “move to place / location” but a “move in this direction” similar to the “Add movement input” function of the pawn class.  
To clarify, I don’t want to tell the AI to “move to the barrel over there” but just to “move forward” or move “45 degrees to the left” indefinitely.

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [October 9, 2020, 12:59pm UTC](https://forums.unrealengine.com/t/make-ai-move-in-a-certain-direction/472614/5 "2020-10-09T12:59:05Z")

</div>

Why don’t you just use “Add Movement Input”? Connected it to Tick and apply a unit vector indicating the direction you want it to go.

---

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [October 9, 2020, 2:46pm UTC](https://forums.unrealengine.com/t/make-ai-move-in-a-certain-direction/472614/6 "2020-10-09T14:46:00Z")

</div>

Putting it in Tick doesn’t appear as the most elegant solution to me but it seems to work. Thanks a bunch!

---

<div class="post-metadata">

**Author:** ![ethanh6165](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ethanh6165](https://forums.unrealengine.com/u/ethanh6165)\
**Post date:** [December 2, 2022, 10:17am UTC](https://forums.unrealengine.com/t/make-ai-move-in-a-certain-direction/472614/7 "2022-12-02T10:17:23Z")

</div>

Here’s my attempt to move an AI character forward using the AI framework.

 ![Screen Shot 2022-12-02 at 6.10.02 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/c/4/2c48792722161d48c98ac6d960011948fc0e92d2.png)

BTDecorator\_MoveForward:  
Simply override PerformConditionCheck to allow BTTask\_MoveForward to execute

BTTask\_MoveForward:

 ![Screen Shot 2022-12-02 at 6.12.11 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/2/6/b266179579360c0575163b1fc307d702df5af2bc.jpeg)

---

<div class="post-metadata">

**Author:** ![sweeetjd](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sweeetjd/32/782492_2.png) [@sweeetjd](https://forums.unrealengine.com/u/sweeetjd)\
**Post date:** [December 21, 2023, 10:26pm UTC](https://forums.unrealengine.com/t/make-ai-move-in-a-certain-direction/472614/8 "2023-12-21T22:26:41Z")

</div>

I realize this is old, but I’m trying to do something similar. Add Movement Input doesn’t seem to work on a non-player AI. Is there something more that needs to be done to make this happen?
