-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep physics steps consistent over multiple frames
To avoid stuttering when the physics FPS does not match the screen refresh at all (60 FPS physics on a 144 or 120 Hz screen), we need to keep track of the typical number of physics steps accumulated over the last N frames; otherwise, the same logic as before with single frame tracking applies. The next accumulated update count should be a stored typical value for it or one higher. Changes to the typical value happen only if a threshold is surpassed.
- Loading branch information
Showing
1 changed file
with
57 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters