25-10-2021, 09:40 AM
(This post was last modified: 25-10-2021, 09:51 AM by josemendez.)
On a side note:
This is a clear symptom of death spiraling: If your physics simulation takes more than X real-world milliseconds to simulate X milliseconds worth of game time, Unity will be forced to perform more than 1 physics update per frame. This negatively affects performance, and forces it to update physics more and more times each frame, entering a downwards performance spiral that stops when it hits your max fixed timestep setting. Its default value is 0.333 seconds, or 3 FPS.
If you're unsure what death spiraling is or how max fixed timestep / fixed timestep affect your physics, there's many online resources that explain it:
https://forum.unity.com/threads/what-is-...ep.330116/
https://docs.unity3d.com/Manual/class-TimeManager.html
https://gafferongames.com/post/fix_your_timestep/
Code:
FPS dropping to 2-4
This is a clear symptom of death spiraling: If your physics simulation takes more than X real-world milliseconds to simulate X milliseconds worth of game time, Unity will be forced to perform more than 1 physics update per frame. This negatively affects performance, and forces it to update physics more and more times each frame, entering a downwards performance spiral that stops when it hits your max fixed timestep setting. Its default value is 0.333 seconds, or 3 FPS.
If you're unsure what death spiraling is or how max fixed timestep / fixed timestep affect your physics, there's many online resources that explain it:
https://forum.unity.com/threads/what-is-...ep.330116/
https://docs.unity3d.com/Manual/class-TimeManager.html
https://gafferongames.com/post/fix_your_timestep/