- Home /
Fixedupdate rate stays at 90 instead of 60
Hi all,
I've been following this official example code to test the update rate and Fixedupdate rate of my unity project.
Update rate VS Fixedupdate rate
However, my framerate appears weird (the GUI displays Update around 90 and Fixedupdate 90!). Could you please do my a favour? Why is it like this?
Hi Yeah, exactly. It is a VR project and I use steam VR-plug in. Before the update rate was around 150(not sure what the fixedupdate rate was). However, after I used this example code to est the update rate and Fixedupdate rate of my unity project. The Update rate turns around 90 and Fixedupdate 90. As you are a master of Unity, do you know why and how I can change back to update rate 150? Thank you so much.
In a VR project you can't do anything about the Update-rate - your frame rate. It is controlled by whichever hardware you run your app on. FixedUpdate-rate is set in "Project Settings"/Time/"Fixed Timestep".
Answer by rh_galaxy · Sep 17, 2020 at 01:32 PM
As you are using SteamVR, it is the dumb fact that the default is that they set the fixed update rate to the same as the frame rate... They override "Fixed Timestep" that you set in your Project Settings/Time. This means that your project will have different fixed update rates depending on which headset your app is running on. Varying from 72 to 144 Hz. It made my replay system fail for example, not having a fixed record and replay speed. Not only that, as you can see the rate isn't even the same throughout the program and from frame to frame, they adjust it a little every frame so that it should come close to the measured frame rate, and therefore Time.fixedDeltaTime will vary from frame to frame and not be constant like the name suggests.
Do this at the start of your GameManager code.
SteamVR.settings.lockPhysicsUpdateRateToRenderFrequency = false;
An easy fix but I think the default behavior is wrong.
Your answer
Follow this Question
Related Questions
Getting Input every few frames? 2 Answers
Frame dependant game. Using update vs fixed update. 3 Answers
Jumping randomly doesn't work 2 Answers
Should player input be caught in Update, and then raycasting in FixedUpdate for shooting mechanics? 1 Answer
How often does the internal physics calculation get called? 1 Answer