-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
delta in _process is incorrect when force_fps is low #24624
Comments
#5332 Setting |
I'm not sure if |
@timoschwarzer In my test case, |
@tinyleolin Thanks for clarification. I can reproduce this issue in 3.1-alpha4. @akien-mga ReproductionSet func _process(delta):
print(str(OS.get_ticks_usec() / 1000000.0) + " - " + str(delta)) Note that if |
This is likely just that the Lines 1934 to 1942 in 9cb1823
I guess you mean |
@akien-mga Yes, |
@akien-mga Whoops, that was a typo. 😅 |
I am experiencing this too, i my case it's affecting tween duration, if I force FPS to any value below my computer's limit it affects it (I think, but it's not proven) proportionally to the difference between the actual machine FPS limit and the forced one. In my case this feature is needed because when I do screen recording, without an FPS limit, Godot does not leave enough CUP to OBS or S>G. So, the related fix #24748 does not seems to fix the problem (unless it's not part of 3.2 beta4). |
I would just like to add that this seems to occur even with just a low fps even if not set (in my case less then 1). |
0.13333 time elapsed per frame would mean 7.5 FPS. This issue may have something to do with the limitation of Godot where physics tickrate is capped at 8 times the game's framerate, since 60 / 8 = 7.5. What happens if you change the physics tickrate (Project settings -> Physics -> Common -> Physics FPS)? |
This is still an issue. Set the physics FPS to 240, then force FPS to any value below 30; watch as _process delta never dips below 0.0333 (stuck at 1/30th of a second, or 8x that of physics delta.) If this is intentional, then a warning should be produced so the user knows that delta is incorrect, and this 8x relationship should be documented. Otherwise things just seem to slow down with no clear reasoning as to why. |
@ludomosa: I believe the 8x part has recently been documented. |
Closing in favor of godotengine/godot-proposals#1893, as feature proposals are now tracked on the Godot proposals repository. The current behavior is done by design to prevent the engine from freezing due to heavy physics calculations at low FPS. It's now documented as of #55667. |
Godot version:
Godot Engine v3.0.6.stable.official.8314054 (installed from Steam)
OS/device including version:
Windows 10 version 1803 (OS internal version 17134.471)
Issue description:
When setting
force_fps
to 2, thedelta
in_process(delta)
is far smaller (which is 0.133333) than the actual time period between two frames (which is 0.5).Steps to reproduce:
Just set the
force_fps
to 2, andprint(delta)
in_process
.The text was updated successfully, but these errors were encountered: