# 8 Way Character Movement with AIController and WASD

**URL:** <https://forums.unrealengine.com/t/8-way-character-movement-with-aicontroller-and-wasd/476557>\
**Category:** Character & Animation\
**Tags:** aicontroller, unreal-engine, question\
**Created:** [December 30, 2020, 3:03am UTC](https://forums.unrealengine.com/t/8-way-character-movement-with-aicontroller-and-wasd/476557 "2020-12-30T03:03:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nasti\_N8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nasti\_N8](https://forums.unrealengine.com/u/Nasti_N8)\
**Post date:** [December 30, 2020, 3:03am UTC](https://forums.unrealengine.com/t/8-way-character-movement-with-aicontroller-and-wasd/476557/1 "2020-12-30T03:03:44Z")

</div>

I’m making a click to move adventure and I want to be able to support WASD movement as well. This involves using an `AIController` to utilize pathfinding and replicate the pawn’s movement. The method below works pretty well for one directional movement, but it won’t move diagonally since it is only handling one `Simple Move To Location` at a time. ie if both `A` and `W` are pressed at the same time, one of them gets overridden. Any ideas or resources for handling both inputs at the same time to move diagonally?

 ![325908-ue4editor-ehipubgt2y.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/f/7df6cb1c44ba54d3fa9fbf9a38b1621257d5b55e.png)

![325909-ue4editor-b3uigwsmwj.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/4/f/74f394c07360ab44fa765ea39b6c6f2ff6f61d59.png)

 ![325910-ue4editor-k8vwe6kmje.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/4/c044b76c5f2d4bfaf8d307c68db958d77cc1e054.jpeg)

---

<div class="post-metadata">

**Author:** ![Nasti\_N8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nasti\_N8](https://forums.unrealengine.com/u/Nasti_N8)\
**Post date:** [December 30, 2020, 4:14am UTC](https://forums.unrealengine.com/t/8-way-character-movement-with-aicontroller-and-wasd/476557/2 "2020-12-30T04:14:37Z")

</div>

Here’s how I got it to work:

Set a variable they share and a boolean if the axis is not zero (being pressed). If the other axis is being pressed, take the value from the variable they share. Otherwise just use the value from the actor.

 ![325920-ue4editor-8gcuxjflh9.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/8/538d41d49827dcac7cf8b8f5eb9a22f5ef838f29.png)

---

<div class="post-metadata">

**Author:** ![Nasti\_N8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nasti\_N8](https://forums.unrealengine.com/u/Nasti_N8)\
**Post date:** [February 11, 2021, 3:13am UTC](https://forums.unrealengine.com/t/8-way-character-movement-with-aicontroller-and-wasd/476557/3 "2021-02-11T03:13:27Z")

</div>

Cleaned it up quite a bit

 ![329496-ue4editor-bsaitsqbei.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/5/515a48488bef7cea960536d7162fe6e6bcbf6afb.png)
