At a loss with pathfinding in a complex map

I’ve been working with pathfinding for Specter and I’m at a loss, nothing I do seems to be able to solve the core issue of Roblox’s PathfindingService being completely incapable when the maps aren’t open and chunky.

Here is a screenshot of the navigation mesh in the most problematic area of the map. I’ve circled all the areas where there are completely unexplainable behaviors.

This has made for an unenjoyable experience for our players, as the ghost NPC often gets stuck, or tries to pathfind through walls, or up through floors!

I’m hoping someone can help me figure out the reason behind this. From my knowledge, it likely has something to do with the 1x1x1 voxel grid which pathfinding runs on. However, I’ve made sure that walls and floors are always 1 stud thick, sometimes by having 2 parts making them 1 stud thick.

4 Likes

If you are using Meshes, the pathfinding is gonna bug out, because meshes and unions have buggy hitboxes in Roblox studio, try using part’s instead, since their hotboxes are way better defined in the studio, and don’t bug out.
Make sure to make meshes uncolidable too.

1 Like

Everything in that screenshot is made with parts.

No unions or Meshes correct? It wouldn’t bug out like this either unless there are unions or meshes in the map.

There are meshes and unions in the map, but not in the area this screenshot was taken in.

Stairs could also mess up pathfinding, but well I wouldn’t bet on it.
Is there a way you can write the location the ghost can go to, like setting a part, anchoring it and having it collide with only the ghost?

EDIT: This should refine the limit’s at which the ghost npc can move through, so it doesn’t get confused too easy.
Also since it’s a ghost, it could probably be cool if it clipped through walls, but at a slower pace

Was able to play around with the map and eventually got a working NavMesh, extremely finnicky, definitely needs some upgrading in the future to be easily usable.

2 Likes