What is the lightest way to use NavMesh in an open world environment?
Hey guys, we're working with a large map that represents a small city. We will have a truck that is automated to go from point A to B, navigating through the city blocks so that it only moves on the roads. The problem is all of the buildings have auto-generated collision boxes, and they're a mess. I figured it may be easier (considering this bug is rampant) to delete all collision boxes, and simply use the Nav Modifier Volume to block out the buildings. Would this be heavier on the build or should I stick to re-editing all collision boxes?
asked May 24 '16 at 07:01 PM in Using UE4
I highly recommend using Navigation Invokers in this situation. Nav Invokers are components that you can add to a blueprint which will only generate Nav Mesh in the desired radius around the pawn. This saves a ton of performance and allows for some nice customization as far as the radius it is generated in, as well as how far away the pawn must be before the unnecessary Nav Mesh is removed.
Here's a quick run down of how to get this set up:
First thing's first, we're going to want to enable a few settings in the Project Settings. Go to Edit->Project Settings->Navigation System and enable the Generate Navigation Only Around Navigation Invokers setting. Then, go into Project Settings->Navigation Mesh and set the Runtime Generation to Dynamic.
Then, we'll need to place a Nav Mesh Bounds Volume in the level. Ensure that it covers the entire space that you'd like the Nav Mesh to be able to generate in, as this is required for the Invoker to be able to generate its section of Nav Mesh.
After you've done this, go into your character/pawn blueprint and add a Navigation Invoker component. Here, you can alter the Tile Generation Radius, which will control how big of an area around the Pawn the Nav Mesh is generated. You can also alter the Tile Removal Radius, which will determine how far away the pawn must get before the Nav Mesh begins to remove itself to keep performance at a decent level.
Let me know if you have any further questions regarding Nav Invokers.
Have a great day
answered May 26 '16 at 07:03 PM
Sean L ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here