This commit is contained in:
mischa 2024-01-28 11:56:32 +01:00
parent 44338c5551
commit 5e56b96f43

View File

@ -231,10 +231,6 @@ protected virtual void SmoothFollowPhysicsCopy()
// smoothly interpolate to the target position. // smoothly interpolate to the target position.
// speed relative to how far away we are // speed relative to how far away we are
float positionStep = distance * positionInterpolationSpeed; float positionStep = distance * positionInterpolationSpeed;
// speed relative to how far away we are.
// => speed increases by distance² because the further away, the
// sooner we need to catch the fuck up
// float positionStep = (distance * distance) * interpolationSpeed;
transform.position = Vector3.MoveTowards(transform.position, physicsCopyRigidbody.position, positionStep * Time.deltaTime); transform.position = Vector3.MoveTowards(transform.position, physicsCopyRigidbody.position, positionStep * Time.deltaTime);
// smoothly interpolate to the target rotation. // smoothly interpolate to the target rotation.