Search Unity

(Case 974438) Rigidbody interpolation is broken in 2017.2

Discussion in 'Physics' started by eigenclass, Dec 1, 2017.

  1. eigenclass

    eigenclass

    Joined:
    Apr 30, 2017
    Posts:
    3
    Hi, I'm seeing a serious interpolation issue in 2017.2 and I thought I'd share some info in case anyone else is affected.

    Basic Rigidbody interpolation appears to be broken in 2017.2. Interpolated objects move with erratic stuttering. The issue is not visible in the editor or a standalone build, but it's very noticeable on mobile devices, especially when the time scale is reduced. Tested on an iPhone 6 Plus and an iPad Pro, both running iOS 11.1.2, with time scale 0.3 and default fixed timestep (0.02).

    Repro steps:
    1. Add a cube with a Rigidbody set to Interpolate
    2. Reduce the time scale to 0.3 to make the issue more visible
    3. Deploy to a device (possibly iOS as I haven't tested this on android)
    Expected result: cube falls smoothly

    Actual results:
    • with 2017.2.0: cube stutters erratically
    • with 2017.1.2: cube falls smoothly
    Interestingly, 2D interpolation works as expected in all tested versions. This issue affects 3D physics only.

    Video showing the issue in action:

    When built with 2017.2.0 and deployed to a mobile device (iOS in my case), the interpolated cube in the middle stutters erratically. The extrapolated cube is smooth. There's a small hiccup when it hits the ground, but that's expected with extrapolation. The left cube is there just for reference, to show the individual timesteps.

    When built with 2017.1.2, the cube in the middle falls smoothly, as it should.

    At full speed, the issue is noticeable for example when interpolated objects are moving over a background that is scrolling smoothly, which is achievable with 2D physics or no physics; in that case the interpolated object shakes and the issue becomes very noticeable, ruining the experience.

    For me, this issue alone makes 2017.2 not fit for production use.

    Reproduced with 2017.2.0f3, 2017.2.0p2 and 2017.2.0p3.
    Issue not present in 2017.1.2f1 and 2017.1.2p3.

    Tested with OpenGL ES 2, OpenGL ES 3 and Metal, but it doesn't matter as this is not a rendering issue.
     
    ModLunar and Peter77 like this.
  2. eigenclass

    eigenclass

    Joined:
    Apr 30, 2017
    Posts:
    3
    Edy likes this.
  3. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
  4. Recart

    Recart

    Joined:
    Jun 4, 2017
    Posts:
    9
    In my case switching rigidbody Interpolate parameter to Extrapolate solved issue
     
  5. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    Just saw this thread after making a post about my own timestep/interpolation/judder problems - which may or may not be related?

    I've not seen completely broken interpolation - but it does appear that interpolated 3D physics updates do not match Time.deltaTime updates when the framerate fluctuates.

    But in my case, it only seems a problem on mobile (editor is fine), also only with 3D rigidbodies, and it requires a fluctuating framerate to become noticable (which isn't hard to achieve on Android...)