This is an improved (refactored) version of the code from the "Timesteps and Achieving Smooth Motion in Unity" article.
Now, there are only 2 components instead of original 3:
InterpolationFactorControllera singleton scene component (the original name wasInterpolationController) that calculates the current interpolation factor.InterpolationObjectControllera component for a moving object (the original name wasInterpolatedTransform) which calculates the current interpolation for the object in theUpdate()method before it's being rendered and then restores its originaltransformvalues for the nextFixedUpdate()call.- The
InterpolatedTransformUpdatercomponent was removed as unnecessary.
For these scripts to work correctly the user's script must change the object's transform only in the FixedUpdate() method. When teleporting the object the user should call the (InterpolationObjectController).ResetTransforms() method after it.