AI Move on Grid

I’m making an arcadey-type game, and the players and AI can only move on a grid, in 50 unit increments. The AI needs to be able to navigate to the player thru narrow hallways. I’ve got it so that it will navigate the maze, but not in a grid fashion. Another attempt allows me to move it towards the player on the grid, but just using look at direction so it runs right into walls. I’m having trouble combining the two, Path finding but movement based on a grid. Should I spend more time learning the EQS system or is there a better way?

You might be able to fudge your way through it. But in my experience, you’re better off writing your own movement system, since it’s based on a grid. The reason is, the grid system can then tell whether a tile can be penetrated or not. I ended up moving my units from tile to tiles using lerp and timeline.

As in, replace the character movement system that is default? Or going so far as making my own pathfinding system?

Woo! I think I got it working! I was using “Find Path to Location Synchronously” wrong. Path start was my pawn’s current location, Path end is the players location, and it returns an array of Path Points. But I was getting the first value, which is the path start, so he was just walking straight down. I switched it to getting the second value, and now he follows the player through the maze on grid! I then use some simple comparisons to keep him moving on a grid.

5080ccf64fc7422f761b5a0805082c84ae8ea11f.jpeg

2 Likes