11-11-2019, 05:37 PM
(09-11-2019, 08:30 AM)josemendez Wrote: Hi,
Deep profiling will cause any game to run 70-80% slower than it usually would, which can (usually will) trigger death spiraling.(*) Excerpt from Unity's manual:
https://docs.unity3d.com/Manual/Profiler...-profiling
So disable the profiler entirely. If you have performance issues, profile using the normal profiler. If you still can't figure out what's happening, then use deep profiling to get a sense of relative (not absolute!) performance between function calls.
(*)This is a situation where each frame takes a lot of time to be completed, which increases the amount of time to be simulated by physics, increasing the amount of fixed updates needed per frame, which in turn causes the next frame to take even longer to complete...in a downwards spiral that ends when a frame takes less time to process than the amount of "wall-clock" time it simulates, or when you hit the maximum fixed timestep. If you're having this issue, reducing the maximum fixed timestep or increasing the timestep are viable solutions.
Hey Jose,
Naturally it will run slower with the deep profiler, but these stutters happen all the time, even with no ropes on the scene and an object with an ObiSolver component active.
Below is a screenshot of the spike with the default profiler:
[attachment=462]
Disabling the ObiSolver while no ropes are on the scene makes the game run smooth again, but I start seeing these spikes whenever I re-enable it. The leash created is between the player, which has a phase value of 1, and a ball which has a phase value of 2.
Do you have any other suggestions to improve framerate besides increasing the timestep or reducing the maximum fixed timestep?
Thanks!