# How to make character follow path from array of locations?

**URL:** <https://forums.unrealengine.com/t/how-to-make-character-follow-path-from-array-of-locations/487375>\
**Category:** Character & Animation\
**Tags:** pathfinding, path-follow, unreal-engine, grid, question\
**Created:** [August 12, 2021, 8:49pm UTC](https://forums.unrealengine.com/t/how-to-make-character-follow-path-from-array-of-locations/487375 "2021-08-12T20:49:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CanadianCheesus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CanadianCheesus](https://forums.unrealengine.com/u/CanadianCheesus)\
**Post date:** [August 12, 2021, 8:49pm UTC](https://forums.unrealengine.com/t/how-to-make-character-follow-path-from-array-of-locations/487375/1 "2021-08-12T20:49:11Z")

</div>

I am trying to implement grid based movement. I have multiple grids, at begin play the locations for each tile are added to an array.

I would like to generate the shortest path between two points but only have the character move between points of the location array.

I see that A\* path-finding does what I need but I am unsure on if this will work with my setup.

Any advice on how to do this would be greatly appreciated! Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 13, 2021, 6:54am UTC](https://forums.unrealengine.com/t/how-to-make-character-follow-path-from-array-of-locations/487375/2 "2021-08-13T06:54:02Z")

</div>

AI move to would definitely do it. You can choose one of your grid points, and then just hand it to the move to node. As long as you have the navigation volume and character setup correctly.

---

<div class="post-metadata">

**Author:** ![CanadianCheesus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CanadianCheesus](https://forums.unrealengine.com/u/CanadianCheesus)\
**Post date:** [August 13, 2021, 1:15pm UTC](https://forums.unrealengine.com/t/how-to-make-character-follow-path-from-array-of-locations/487375/3 "2021-08-13T13:15:29Z")

</div>

Okay fantastic, thank you so much! So once I have the list of desired locations I will use AI move to move between them.

To get that list of desired locations from my master list of locations would I use A\* Pathfinding?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 13, 2021, 2:45pm UTC](https://forums.unrealengine.com/t/how-to-make-character-follow-path-from-array-of-locations/487375/4 "2021-08-13T14:45:12Z")

</div>

Nearly.

I thought you specifically wanted to use a list of locations.

If you only want to use AI, you can just set the region and use MoveTo, that’s it.

But if you want to use specific locations, you can plug them into the MoveTo node.

EDIT: Tell me if it’s not clear, I’ll do a specific example.
