Pathfinding query - how to block paths?

I’ve been trying to work on an ‘advanced ai’ that utilizes the pathfinding service. The basic principles being that the AI can detect enemy threat and calculate another path to reach it’s target.

At the moment the AI is doing decently, it can detect enemy threat and calculate another route, but in order to do so I need to setup huge collidable walls actively to block the threatened (and previously calculated) path.

I hoped that the pathfinding service would recognise non-collidable walls as obstacles, but it’d seem not, and as far as I know, there’s currently no way you can tell the pathfinder that a certain path has already been tried.

Could some sort of feature be implemented into the pathfinding service to, perhaps give an identifier of some type, or perhaps the ability to search for multiple paths when ComputeRaw/SmoothPathAsync is called?

For example:
paths = ComputeRawPathAsync(Vector3 Start, Vector3 Finish, float MaxDistance, float NumberOfPaths)

’paths’ would be a table of paths, of which contain the current path properties/functions etc

If this doesn’t make much sense, please let me know, it’s my first time writing a topic here.
Any help would be appreciated.


Hi, welcome to the devforum!

I have also suggested improvements for the PathfindingService a long time ago but it seems like right after the service was added it got neglected. Although I would still love to see improvements you’re probably better of trying to write your own system for now. There have been quite a few people on this forum who have done something like that and could probably help you with it.

You should also move this topic to the feature request section (in the client features sub-category) since that’s where the Roblox employees look for these kind of requests. If you edit your post you can select a new category.

Hiya, thanks for the suggestion and replying, I did see your pathfinding post earlier.

I’m not so great on algorithms and advanced scripts so this is kinda a big project for me, but I’ll look around for help.

Thanks again.