- Home /
How to fix stuttering of balls falling under gravity force.
I used Rigidbody2D, with gravity scale equal to 0.1, and Interpolate is set as Interpolate
. The rest of setting you can see on the right-hand side one the video posted below:
https://youtu.be/Zx8kelB_g0A .
My problem is that it stutters significantly (see 5-6 sec, 13-14 sec). There is nothing special in the game scene just several balls falling under gravity working on MacBook Pro. FPS is also very good. Anyone knows how to fix this?
This could be caused simply by Unity's debugging and editor garbage collection running and occasionally making brief periods of lag. When you build the game as an app, does the problem persist, or is it only in the editor?
Answer by naghekyan · Jul 26, 2017 at 05:09 AM
As Unity uses fixed-timestep physics you should deal with temporal aliasing caused by the accumulation of a remainder at each frame. For this reason you should use Interpolation setting on rigid body. But the Interpolation does not work in Unity Editor. So this should be deployed on the actual device and only then checked.
Your answer
Follow this Question
Related Questions
Putting Physics into the Late Update, fixes the problem ? 1 Answer
Objects stutter when using First Person Controller? 4 Answers
Movement jitter every few seconds 1 Answer
Inconsistent jitter in iOS 1 Answer
Rigidbody projectile jittering 0 Answers