Search Unity

[2018.3] Rigidbody Interpolation doesn't have any effect when using Rigidbody::Velocity

Discussion in 'Physics' started by HTFClem, Dec 28, 2018.

  1. HTFClem

    HTFClem

    Joined:
    Sep 5, 2018
    Posts:
    19
    Hi there,

    I'm working on some Camera code. My character is Rigidbody based, but I also have other NavMeshAgents moving around, so I can't just use FixedUpdate to move the camera, or the agents end up being all jittery on the screen.

    I wanted to simply use Rigidbody Interpolation on our character but unfortunately it is still really jittery.
    My "fix", at the moment, is to disable interpolation and to manually apply some sort of interpolation between last FixedUpdate and current position in Update to move my character model, but it feels wrong to do that when there is supposed to be a feature for that built in the Rigidbodies.

    I don't do anything crazy though, I calculate a fine tuned Velocity (with custom damping and accelerations) that I then assign the Rigidbody directly using Rigidbody::velocity property.

    To test and check if interpolation was working properly, I simply set the Fixed Timestep to something like 0.1, which makes it very visible (and it works on other objects, like, a falling Cube, for instance).

    Any pointer?

    Thanks,

    Clem