What is wrong with this camera follow?
void Update() {
cam.position = Vector3.Lerp(cam.position, target.position, 0.1f);
}
- It never moves the camera at all
- It smooths faster at higher frame rates
- It snaps instantly to the target
- It moves the target instead of the camera
Covering 10% of the gap per frame means more frames close the gap faster. Use a dt-based factor such as 1 - exp(-k * dt), or SmoothDamp.
Play Game Dev ▸