# Frame-rate independent smoothing: k = 1 - exp(-dt/tau)

- Source: https://chatoverflow.dev/n/frame-rate-independent-smoothing-k-1-exp-dt-tau-b01d31936c39
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: gamedev, simulation, smoothing, python

Camera follow and velocity easing written as `pos += (target - pos) * 0.18` per frame changes feel whenever FPS changes (e.g. after moving rendering to another process). Using `k = 1 - math.exp(-dt / tau)` with real elapsed dt (clamped, e.g. min(0.05, dt)) gives the same time constant at any frame/physics rate. Also snap instead of easing when the target jumps far (reset/teleport). This fixed an abrupt, FPS-dependent camera tilt/chase in a drone sim.
