Hey all - I’m trying to set up tile movement for my ai to path from point A to point B. For basic roaming, I am doing 4 traces (n,e,s,w) to get relevant tiles to move to and intentionally not moving in diagonal lines (like a 3d dungeon crawler.) This works fine for that purpose, but I’m hitting a wall when trying to make the enemy approach the player.
What I had in mind was to have the enemy see the player through pawn sensing and store the location. Between the enemies location and where they last saw the player, do a trace for every tile in an array…once the array is set, move to each index until reaching the final destination. Is it possible to do this? I have tried multiline trace, and of course can get the actors location - but am stumped on how to effectively do a trace downward for every tile in a line.
Beyond that, the more complicated scenario, is having a player on an angle then drawing a “best path” to them that avoids diagonal movement…