Fixed Timestep is changing itself during runtime.

Hello.

I’ve discovered that my Project Settings > Time > Fixed Timestep is changing itself from 0.01111111 (90fps) to 0.013888889 (72fps) randomly during runtime. I cannot seem to find how or where to lock it at the expected value.

I am developing a VR game, but this is occurring both when I have an HTC Vive (90hz) or an Oculus Quest 2 (72~90hz) connected. So it does not appear to be the connected HMD that is the source of the issue.

Has anyone encountered this before, and are able to inform me how to stop the Fixed Timestep from automatically changing?

Thank you.

I think you could “lock” it by checking Time.fixedDeltaTime each frame - if it’s !expectedValue then set it to expectedValue.

Actually, just found the culprit. In SteamVR_Render.cs there is a small code block within Update() that attempts to change Fixed Timestep to match the current render framerate.

I commented out that section, and no more issue.

1 Like

I notice a tiny glitch every few seconds in my vive project, I thought it might be that 0.11111 isn’t exactly 90hz, causing the physics frame to miss the update every so often. Might this be the case? Is there any way to guarantee the physics and update stay exactly in sync? Should I run the physics slightly faster than 90hz so its always up to date when rendering?

I don’t use SteamVR but this still happens here and i can’t see why. I’m using Vive Input Utility which does have a section with this logic, but it’s behind an #ifdef for unity 2020_1 or lower, so not executed (using 2021.3).
Is unity internal VR logic doing this too?