How I can modify navmesh settings to get grid like movement?

You aren’t very specific on what you are going for, but if you want something complex the best way I found to do it is to use the environmental querry system for all things grid related, and drop the movement component to handle movement manually. You could use the EQS and movement nodes but it won’t look clean and moving from tile to tile is the easy part anyway.

Generate a simple grid around the actor you want to move, the “space between” setting of the grid is the size of each tile in the grid. Use the tests to check for overlaps, check if path exist, check length, then a distance check to filter out all the EQS objects except the adjacent tiles, highest scoring object is the destination tile, move to it and repeat. If you are doing a complex project then it is not simple at all, but modifing the movement component wouldn’t make it much easier unless you really went to town on it.


This is how I setup the EQS, heroes is whichever target the npc is chasing.


This vid was from when I was fixing a stacking bug, but it’s using the same EQS. Player map clicking is done with a similar EQS.

1 Like

Thank you, I would take a look at this. Sorry for being not specific. I’m working on “classic” dungeon crawler tool to participate mostly in game jams for now, so there is no diagonal movements there. It seems that it should be simpler but instead it become a problem, cos enemies as well as player moving “unnatural” way) Especially when it comes to diagonal movements using 4-way grid. I thought about making a static enemies but guys I’m working with want some action so I’m starting to look for simpler solution than making pathfinding from scratch. I’m aware that there are good tutorials out there how to make it and I made one in Unity but for now I want something that will take few days not a couple of weeks. If I would consider to make a full game I certainly go for it, I like to have a control on things. But for the moment realistically I have music and sound systems to work on seriously, because it is essencial for project and want to spend less time working on systems which are already there.
By the way I’ve tested navlink system with 3 AI characters and it’s ok.

The only serious problem so far that AI stuck in a link (cos there is no navmesh there) if its movement is aborted. So I need to check somehow if AI character is on navmesh before abort its movement.

I’m started to look at EQS and think that it’s a good solution. thank you. I will give it a try for certain.

@jay001020
I used ESQ to make this example. it’s much better that solution I’ve made. Thank you.