Toggle for completely ignoring a part in navigation mesh generation

The Issue

As a Roblox developer, it is currently too hard to guarantee that a part or model is completely ignored by the navigation mesh generation. The current ways of doing this are either not ideal, or problematic.
Here are the main three ways that you can do this currently, and the problems with each:

  1. Using Pathfinding Modifiers
    While pathfinding modifiers are especially useful for this, they are problematic in some cases. If you want to make a non-humanoid agent that can move around using the pathfinding service, their model will interfere with the navmesh, and generate on their model as if it’s a static object that other agents can navigate on. This can result in pathfinding issues, and is generally not ideal for this usecase.
    Another place where pathfinding modifiers are problematic is user-placed structures within a game. Specifically in my game, players can place structures virtually anywhere, and in any orientation about the Y axis. In some cases, this can cause the navmesh to generate through solid walls when the structure is placed too close to a wall, or the opposite where the pathfinding modifier gets ignored due to its orientation or otherwise, and makes an area of a map completely inaccessible to pathfinding agents. This usually is caused by the limited resolution of the navmesh generation and the complexity of structure models.

  2. Turning off CanCollide
    This is the most straight forward way of making the navmesh ignore a part, but it is not at all ideal in cases where you want it to be ignored but maintain physics collisions. Take the example from earlier of a non-humanoid agent. Obviously an agent/character that can move around will necessitate physics collisions in order to interact with the world, and with players.

  3. Humanoids
    A model with a humanoid child will have all its descendants ignored by the navmesh generation regardless of CanCollide, which is very useful in the case of characters that actually use humanoids, but otherwise not ideal for every other case. If you want a single part, or a static model, or whatever else that is not a humanoid to be ignored by the navmesh generation, all the extra weight of the humanoid is a waste and will undoubtedly have a performance cost if you have a lot of these inert humanoids sitting around, even with their state machines turned off.

Proposed Solution

Give BasePart, or Models a new property that makes them completely ignored by the navigation mesh generation, in the same way the humanoids currently are. Simple as that. It would make my life a whole lot easier, instead of fiddling over and over with pathfinding modifiers and other workarounds just to achieve something this simple. I can imagine many other developers with games that heavily rely on the pathfinding service would feel much the same, and would love a feature like this.

10 Likes

What if Modifiers could be parented directly under Models, and have their effects be applied to the navigation geometry that Model generates? So, having PassThrough would just remove it’s influence, but you could also have polygon-perfect navigation modifiers without having to create an approximate volume.

1 Like