I use const fps = 60 in many of my demos.
The fps constant is meant to be the number of physics updates per second.
You should use a fixed timestep for best results as a variable timestep can make even a RK4-integrator go bananas.
I recommend reading this timestep tutorial by Gaffer(Glenn Fiedler)
http://www.gaffer.org/articles/Timestep.html
The fps constant is meant to be the number of physics updates per second.
You should use a fixed timestep for best results as a variable timestep can make even a RK4-integrator go bananas.
I recommend reading this timestep tutorial by Gaffer(Glenn Fiedler)
http://www.gaffer.org/articles/Timestep.html