Physical Material AI Navigation

Hello Together,

I have a landscape with phyiscal materials applyed. Now I want my navmesh to read them and change the cost of navigation accordingly. Also the cost should be different for different actors. Human (Road > Grass > Wood), Fox (Wood > Grass > Road).

I tried to abuse PCG, and place a navemesh modif volume every few meter over the whole world, wich kinda works, until I place something like a road or bridge over it. And it is kinda costly with that many actors (even partitioned).

Is there a way to get that done in Blueprint? If not I’d appriciate any input for a C++ version.

Do physical materials have an interaction/collision channel? I haven’t used them before but if they do then cast off the collision event and cast to the Fox, Human actor. Then keep the different “Navigation Costs” in the actor. Find the proper navigation cost in something like an array map that is selected depending on what physical material is being interacted with.

Dont think that physical materials themself have an interaction/Collision channel. But they are part of my landscape through “Pyhsical Material output”. Also other actors, like bridges or road do have some physical material that need to be read.

I dont know where I should get a collision from aswell since I currently use the navmeshvolume → “recastnavmesh-default”.

For the pathing it would be great to assigne navareas that can be read by “NavigationQueryFilters”, wich can be manipulated for every actor type.

Okey, I kinda gott an Idea. Would it be possible to use PCG Biome, Triangulate the area inside a certain biome (For example forest), turn it into a volume, add a navmeshmodifier to that volume?

After that it should be possible to use the navigation query filters?

Seems like a lot of work for something that should be easy? Would appriciate other ideas :smiley:

I found some kind of a solution by now.

Create a DynamicMesh with SplineComponent. Get the Vertecies from the spline points. Use “Append Simple Extrude Polygon” Node. Convert the mesh into a volume with “Create new Volume from Mesh”. Change area class.

Now I can use the spline to create my PCG Area (For example forest), wich does change the area into Forest Nav Mesh, wich in return can be used by the corresponding NPC’s