0

I saw a twitter post mention the following as way to make movement frame-rate independent:

changeRate = 1 - exp(-2.0 * PI * cutoff / fps)
speed -= speed * changeRate

What is cutoff? And is fps a constant or the actual fps?

As someone unfamiliar with game development, I'm probably doing all these wrong, but the equation above is the green ball:

https://codesandbox.io/s/gallant-davinci-f7o19?file=/src/index.ts

0 Answers0