Dynamic navmesh and pathfind causes incremental framerate drop
If I set my navmesh to "Dynamic" or "Dynamic Modifiers Only" and then put a pathfind in the event tick of a blueprint I will see an incremental performance decrease over time until it suddenly shoots up to full framerate again. Which I guess is when garbage collection occurs.
Steps to reproduce: 1. Blank project. 2. Place a standard "Floor_400x400" static mesh at -500,-500,0 and scale it to 5,5,2 3. Add a NavMeshBoundsVolume that covers the floor, and check that a RecastNavMesh is created properly. 4. Set the RecastNavMesh runtime generation to "Dynamic" or "Dynamic Modifiers Only". 5. Open the SM_Chair asset and under Navigation, set its area class to NavArea_Obstacle and check the "Is Dynamic Obstacle" box. 6. Create an Actor blueprint and add the newly modified SM_Chair asset to it. 7. Add a "AddLocalRotation" node in the Event tick of the blueprint with delta rotation 0,0,1 and hook it up to the SM_Chair static mesh component. This is to force the navmesh to be recalculated every frame. 8. Add a "FindPathToLocationSynchronously" node in the Event tick with path start set to 1300,1300,1 and path end -350,-350,1. 9. Place the actor on the floor in the level so that it affects the navmesh. 10. Hit run and use the console to show the navmesh and show the FPS. Make sure the navmesh is constantly updating and see how the framerate gradually goes down over time.
Is there any way to avoid this issue? A garbage collect seems to prevent the framerate from gradually decreasing, but it also prevents the game from running at any desired framerate. Is there a more selective garbage collect I can do, or perhaps another approach altogether?
asked Sep 19 '17 at 10:46 AM in Bug Reports
Follow this question
Once you sign in you will be able to subscribe for any updates here