PathfindingService Woes

How do I know which wall segment to pathfind to? I’d have to implement my own pathing, which would defeat the purpose of PathfindingService. The problem is that it’s not possible to use PathfindingService in combination with our games’ code without having to render PathfindingService redundant.

1 Like

By this. You could actually setup a pathfind to the crystal and this will show the wall obstruction in the path.

1 Like

That gives me a single blocking segment – it doesn’t continue. It would return the wooden fence in front of me despite having 10 layers of stone walls behind it, rather than the slightly more inconvenient-to-access segment which has open space behind it. I thoroughly looked through PathfindingService and brainstormed all possible ways it could be integrated into my games – it does not satisfy any of the use cases mentioned in the OP.

1 Like

Recompute the path and try again until success. ???

1 Like

Hi Sparker,

There is no way to ignore certain areas/obstructions, so recomputing the path would provide the same result. I encourage you to check out the Pathfinding tutorial on the ROBLOX Wiki to gain a better understanding of how PathfindingService functions, and to review the use cases in the feature request.

Also, please note that ROBLOX is constantly evolving, and its features will grow along with it regardless of their original intentions. Our talented engineers ultimately decide how these features should evolve based on demand from the community – if you are negatively impacted by these changes, please share how they would affect you, but otherwise Feature Requests is for proposing changes, rather than deciding the way they will evolve ourselves.

Thanks,
Echo

6 Likes

Sort of hoping there will be a way to disable jumping and maybe falling of large ledges completely. No clue how flexible the pathfinding on the generated navmesh is though…

2 Likes

Maybe this idea could be used with the new instance tagging feature, allowing us to mark which objects are “safe” or “dangerous”.

1 Like

Invisible parts + collision filters can do this.

Please note that half of your reply was redundant and completely unproductive to the conversation and seems to only exist as a subtle way to take a stab at me. Being subtle does not excuse this and is highly unnecessary.

5 Likes

(To sparker) To be honest what you told him was rather vague. You effectively just said “try to pathfind over and over until it suddenly works for no specific reason”. Absolutely no workable solution. Now that you have mentioned “Invisible parts + collision filters can do this.”, that’s a bit more descriptive and makes sense.

@EchoReaper I did have an idea for this, and what you could do is add nodes to an area outside of each wall (so outside of the castle, have a part outside of the breakable sections that’s a certain distance from the wall) and then have the troll pathfind towards that node until they get within some larger distance of it, like 15-20 studs. After they are within that radius from the node, I THINK you can set EmptyCutoff to 1 and pathfind to the crystal, which will cause a path to be made no matter what (Because nothing can be considered a full voxel in the pathfinding grid and is thus ignored as an obstruction).

Try that out and see how it works, I can elaborate further if you want.

2 Likes

You have to take the previous part of the conversation into context. I said to make a pathfind to the wall, tear it down etc and pathfind to the crystal. He said how will be know which wall segment, in that case he can pathfind to the crystal, get the first obstruction to tear it down. He then questioned about the pathfinding continuing. Which you would just recompute the path and keep trying tearing down the walls until success. I figured when I said recompute and pathfind until success also implied the tear down wall part, maybe that wasn’t clear enough.

Invisible parts + collision filters is for the weighting issue.

The fact that a solution exists does not mean it is a good solution. That would be slower than just writing your own pathfinding system in Lua, which ignores the point of putting the load on C-sided APIs. The worst case for the pathfinding API is when no path exists.

12 Likes

Hi Sparker,

A number of features can be accomplished by hacking around existing limitations (AnchorPoint, Instance Tagging, Region/Ray whitelists/blacklists, etc) – including pathfinding. The original features these branched off of were designed to be suit users’ needs, feedback showed they never or no longer did, and they were improved. Needing to hack around existing limitations of a feature demonstrates a flaw in that feature fulfilling users’ needs.

As waffle mentioned as well, there are other implications such as performance concerning current workarounds. The following is taken from the context of ROBLOX animations, but it applies to pathfinding as well:

Thanks,
Echo

6 Likes
  1. Do you have any backing to those claims
  2. First performance has to be an issue.

Weighting is something we will most likely add to NavigationService in the near future.
Also parameter sets, to allow for custom agent sizes and capabilities (i.e. agent width, height, jump distance, max fall).

Portals are an interesting idea and we will consider it.
Although for your castle use case, setting a high weight to the walls could do the trick and even be easier to set up.

The new service should gracefully handle “grounded” objects.

Adding support for CollectionService and CollisionGroups is also something we are looking into.

9 Likes

Sorry for the bump, but this is very important / relevant to my current projects.

I have to reprogram my AI for a third time to somehow get by the current limitations of the service. Aside from the lack of functionality when you get NoPath, I can’t add an ignorelist when checking for occupancy. Because of this, I have to calculate paths around the outer edges of whatever model or part I do. This can be done with a ray or some Vector3 math, but I shouldn’t have to be doing that by now (4 months after the release of the upgraded service).

Edit: 4 months not 6 months.

5 Likes

I’d really love to see something be done to accommodate vehicles. Perhaps the PathfindingService could include an ignore list and an include list? This way we can make vehicles follow roads the way they always should have :stuck_out_tongue:

2 Likes

Hi,

It’s been quite some time, is this something Roblox is still looking into?

PathfindingModifiers can be used to allow agents to ignore certain obstacles like doors, and PathfindingLinks can be used to specify a “link” between two areas with custom functionality, which facilitates the “portals” feature request.

1 Like

Yes, I know about both of those and we use them in our games. They can’t solve all of the same use cases that collision groups could since they are global modifiers for all pathfinding agents and collision groups are more specific.

I’m not 100% sure about this, but maybe on different agents you can specify a cost of math.huge for PathfindingModifiers that should let only some agents through with PassThrough property, and the same for the PathfindingLinks, but I haven’t tested.