|
|
The best (in my opinion) way is to have a fixed physics timestep. Then, each time you update your main loop you advance the physics system until it just goes _beyond_ the "system" time. Then for each physical object interpolate between it's current and old position/orientation, based on the system and the physics time, and use this interpolated state to render.
If you do this you can run your physics system at a low frequency - e.g. 30Hz - assuming it's stable, and your game looks really smooth even if the frame rate is high. If you don't interpolate then you can get jerkiness due to irregular numbers of physics updates per frame, and due to the fact that even with a high framerate objects don't necessarily move every frame (especially a problem if your camera isn't synced to the physics system).
|