I’ve already seen a thread about the same issue, But it died without any admins responding to it, so here I go again B)
Currently in my game, I’m trying to create NPCs who follow the player, and are able to open doors if doors block their path.
Now, this is currently impossible as If I have a door, the pathfinding will think its an obstacle and return “ClosestNoPath”.
Like this:
I can think of endless similar issues where you have something you want the pathfinder to ignore BUT YOU CANNOT because pathfinding DOES NOT HAVE AN IGNORE LIST. This is seriously limiting the use of the PathfindingService.
I would simply not complain about this and use my own pathfinder instead, but my own pathfinder requires me to place nodes manually and it would take a lot of time.
I really suggest you guys add something like this, where you can set a table of objects and their descendants for the pathfinder to ignore. FindRawPathWithIgnoreListAsync(Vector3 start, Vector3 finish, Float maxdistance, Objects ignoreDescendentsTable)
FindSmoothPathWithIgnoreListAsync(Vector3 start, Vector3 finish, Float maxdistance, Objects ignoreDescendentsTable)
Or you could not add any new methods and you could Just add the ignorelist argument to the current methods.
Q/A:
“Why use doors?” - My game is a survival shooter where you can weld doors shut to hold off enemies. It’s a must have game mechanic.
“Why not use FE client-sided doors?” - Nothing level related should be handled on the client. Ever.
Don’t forget to ask for the opposite feature as well. It’s currently impossible to make AI’s that can jump over a gap. Having unCanCollided Parts be counted as CanCollided Parts would be really useful. It’d make it possible to make an AI that jumps over a gap by just adding a Transparent Part with no collision to the gap. Then add two Touched triggers at the edges of the gap to make it jump and tadah! you have an AI that hops over gaps.
The ability to prevent the path from generating on top of certain bricks or terrain cells would be nice too. It would be useful for pedestrian AI and making them not walk into the street.
[quote] I agree that this is a much needed addition to the current system.
For the time being, you could use Filtering Enabled to make doors for the clients and keep the areas open on the server. [/quote]
I just feel like I shouldn’t go through all the trouble. I mean I am using FilteringEnabled, but nothing in the level that affects gameplay should be handled on the client. It’s just a rule I have and I’m not breaking it for anything.
[quote] I agree that this is a much needed addition to the current system.
For the time being, you could use Filtering Enabled to make doors for the clients and keep the areas open on the server. [/quote]
I just feel like I shouldn’t go through all the trouble. I mean I am using FilteringEnabled, but nothing in the level that affects gameplay should never be handled on the client. It’s just a rule I have and I’m not breaking it for anything.[/quote]
I understand that. Hmmm, my only other suggestion would be making a duplicate of the basic level geometry, running the pathfinding there, and then offsetting the found path onto the actual map and account for interactive map elements then.
[quote] [quote=“TheNickmaster21” post=104995]I agree that this is a much needed addition to the current system.
For the time being, you could use Filtering Enabled to make doors for the clients and keep the areas open on the server. [/quote]
I just feel like I shouldn’t go through all the trouble. I mean I am using FilteringEnabled, but nothing in the level that affects gameplay should never be handled on the client. It’s just a rule I have and I’m not breaking it for anything.[/quote]
I understand that. Hmmm, my only other suggestion would be making a duplicate of the basic level geometry, running the pathfinding there, and then offsetting the found path onto the actual map and account for interactive map elements then.[/quote]
However this should not be the way to go around it. It should be supported in the API.
And besides, with larger maps it can get kind of hard to have 2 versions of the map.
Perhaps you could move all of the doors up 50 studs, pathfind, and then move back down 50 studs until the ignore list is finally added? It would only move on the target client (since that’s where the pathfinding is being done), and I don’t think they’d be able to see such a quick movement.
Perhaps you could move all of the doors up 50 studs, pathfind, and then move back down 50 studs until the ignore list is finally added? It would only move on the target client (since that’s where the pathfinding is being done), and I don’t think they’d be able to see such a quick movement. [/quote]
Don’t you think that’s still way too annoying rather than having an actual method?
Raycasting has ignoring.
I can think of many other cases than just doors which need ignoring.