Search Unity

Using Steam CameraRig changes the Fixed Timestep setting in Unity at runtime

Discussion in 'AR/VR (XR) Discussion' started by rcorak, Oct 18, 2017.

  1. rcorak

    rcorak

    Joined:
    Oct 18, 2017
    Posts:
    7
    I created a Unity app initially without VR support. There is a lot of Physics logic that is being processed. I added VR support which dropped the FPS rate but was still acceptable just using the standard VR support. I was able to see the Unity app through my Vive HMD. Then I dropped in the CameraRig from the Steam Asset and the FPS went to under 3. I was looking at the Fixed Timestep setting for the TimeManager in Unity that has a default setting of 0.02. However, when I run the app, the Timestep reset to 0.01111111. This was causing too many calls to StepUpdate which brought the app to its knees.

    I looked online and read a comment that said that the Steam Asset did in fact set the Fixed Timestep to 0.01111111 regardless of what you have set in the Time Manager.

    Is this true and if so is there any way to override this behavior?
     
  2. swirvithan

    swirvithan

    Joined:
    May 26, 2017
    Posts:
    13
    If you drag the [SteamVR] prefab under SteamVR/Prefabs into your scene, there's a setting on the SteamVR_Render script on that to "Lock Physics Update Rate To Render Frequency" that you can switch off.

    Fair warning though, having a physics rate lower than your FPS in VR can look pretty bad and even get nauseating. Basically your game will render at 90fps, but your physics objects will appear to be rendering at a much lower fps and "judder" pretty badly, depending on what rate you choose.

    Its not specific to physics, but Michael Abrash has a great blog post about judder in general: http://blogs.valvesoftware.com/abrash/down-the-vr-rabbit-hole-fixing-judder/

    Good luck! Physics performance in VR can be... fun. ;)
     
    pierre92nicot likes this.