Collision channels that affect navmesh?

I noticed that the navmesh works around objects with either pawn or vehicle collision channels set to block. I have created some new object channels in collision and want the navmesh to also take into consideration some of them. How do I let the navmesh identify these new channels so that it builds around objects that block these channels? Either a C++ or Blueprint solution would do. I know it can be done with source code but I’d like to avoid altering it if possible.

Currently the only way to uniformly support new collision channels is to extend UPrimitiveComponent::IsNavigationRelevant. I’ll take a note to make it easier, but currently there’s no straightforward way.

However, do you need custom collision channels at all? Why not try Collision Profiles?

Cheers,

–mieszko

I’ve found a workaround, but a more dynamic or flexible solution would be good. I haven’t toyed around with it much but I feel maybe having multiple navmeshes might be a good idea. I currently am doing a collision setup where I have more than one “type” of pawn, so even if they interact with other objects differently they need to also be able to distinguish between the different pawn types and behave differently for each one so I can’t have just one pawn channel. I don’t think its a high priority for the engine, but having multiple navmeshes at the same time that cover the same area differently with different properties would be a cool addition.

You can already have multiple navmeshes at one time - you set that up by adding entries to NavigationSystem.SupportedAgents (can be done via Project Settings). This probably is not what you’re looking for, but it’s a start :slight_smile: