Move only along grid points

Hello, I am trying to modify the behavior of the pathfinding that MoveToLocation uses, or replace it with something that will work.
I would like the path to essentially snap to grid, (just like VectorSnappedToGrid) like so
image
so the pawn only moves in 45 degree angle increments between “grid points”.

The pawn already starts and ends based on VectorSnappedtoGrid.

I have tried to use Find Path to Location Synchronously


But i think the issue is that it only generates two path points when walking in a straight line (like the left side of my first image) where it would need 3 or more (right side).

Any help with this would be appreciated!

Split the move to location in two parts, first find a location where the turning is supposed to happen, then move from there to the final location.

If this is supposed to be some turn-based implementation for a game, I advice against using the built-in navmesh tools and building your own (look into Dijkstra) or getting a marketplace asset that does it for you.

The tools provided by Unreal are made with games such as UT in mind.

Thanks, I will look into that. I’m mostly just trying to constrain pawn movement along the same grid that VectorSnappedToGrid uses.

I am sitting with this almost exact same problem, only difference is I want to only allow 90 degree movement. Did you ever find a solution?

As JoSf said you really need your own pathfinding for this, likely A* or Dijkstra