How does this navigation path get generated?

How is it possible for PathfindingService to generate this navigation mesh path when it’s entirely blocked off by a wall here?

It’s a rare occurence, but a game-breaking one!

This is among many pathfinding/navigation mesh issues I need to work around for my game which is heavily reliant on pathfinding.

The navigation mesh indicates that it’s possible to jump half-way up the wall, which does not make any sense!

Regular version of the map

Pathfinding version of the map

Used to work around pathfinding issues

Roblox pathfinding always tries to find smth to make jump connect. In case of your hexagonal map, best option you have is to make your custom pathfinding system. It will be grid based, and will be faster than regular roblox pathfinding.

2 Likes

Another related issue where the navmesh simply doesn’t get generated where it’s supposed to!

The only way to “fix” this is by manually moving each tile up and down to force the navmesh to regenerate for those tiles. This isn’t possible in-game obviously…

Have you read my suggestion? Don’t use built-in nav mesh, it won’t work well for you.

I see your point, but it’s worth reporting.

Further down the line I am planning on taking the time to replace Roblox’s pathfinding.

Hi I played your game really cool stuff, this is not a solution to your current problem, but this might be a better way to create better paths for your game. My suggestion is to use the roblox pathfinding for a 3d environment, were you can have multiple floors or climbing abilities etc. But for a 2d map like yours, it might be better to just go with 2d a* algorythm. This way you don’t need a navmesh, and you can simply make the pathfinding map with nodes. Making this in Roblox is actually very simple, and the algorithm is also very simple. There are many tutorials on youtube on the a* algorythm A* Pathfinding (E01: algorithm explanation) If you are interested in making your own algorithm I would suggest watching this series, it explains the concepts really simple and easy. The general concepts are just placing nodes on each hexagon, and then give the algorythm a start point, an endpoint. And then giving the nodemap, which is just a list of all the nodes positions. And it will find a path from the start to endpoint. If I have some spare time, I can give you the code for the a* algorythm I made, and tune it to work for your needs.

Here are some clips of the algorithm I made on Roblox, its really fast.


Sorry for this ugly demonstration. But you could do something like this
The green dots indicate its a node. The red dots are just there to connect with other nodes, lets say a npc is walking from the green node to the neighboring node, it will then just tween from the green node to the red node, then lets say the other neighboring node has a lower height, you can then play an animation where the npc jumps down. This demonstration shows how a path could maybe look like.

2 Likes

Oh and another thing you can also add more nodes if you want the npc to be able to create paths diagonally etc.

2 Likes