Hello, I having a fps drop problem in my game and I found out what caused this problem. There are chaos vehicles spawning on the map. When I turn them off, the fps is constant at 98-102, but when I open them, it drops to 80 and then 60-50 in between. These drops last for 5-10 seconds and the fps continues to decrease every 30 seconds. it does . In short, the system spawns a vehicle every 30 seconds (there is no fps drop in spawn) and they go by following the spline in an actor called path on the map. Is there anything I can do or alleviate about this?
If they are AI vehicles just running on a spline use a static mesh.
thanks for the answer but still same ,I changed the car to static mesh and tried again, but again, there is only the spline tracking code on the same car, nothing else. In fact, when I remove the cars, the fps is always constant between 95-100, but when it becomes a car, after 4-5 minutes, sometimes it drops to 50, sometimes it drops to 30, but it goes back up to 95.
(I assign the spline reference to the car I spawned inside an actor called spline path.)
swap out the cars for primitive shape… cube. Use a simple material. Test.
If you get the same result, then it isn’t the vehicle, its the code.
Yes, I finally solved the problem. The problem was not actually caused by the cars or the code. Of course, using static instead of skeletal mesh gave me 3-5 more fps, but there were two important things that helped me reduce the drops. I solved this by typing stat Game in the console (https://docs .unrealengine.com/4.27/en-US/TestingAndOptimization/PerformanceAndProfiling/CPU/)
I previously examined the events of the cars with the session frontend and did not see any excessive MS, so I resorted to this.
I left the game open for 5-10 minutes (editor) and saw that nav tick and world tick reached excessive MS values after a while, then I realized what I needed to solve.
1- I turned off the affect navmesh feature in cars(because I had people walking around and using navmesh)
2- From project settings, I increased the Time Between Purging Pending Kill Objects value in engine - garbage collection from 60 to 600.
3-Actually, the two steps above were enough, but rather than fps drop, I opened nanites to some high poly meshes on the map (even though I gave them lod), which gave me a few more fps.
I hope it will be useful to others as well
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.