Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

50hz FixedUpdate looks like reprojection

Discussion in 'VR' started by Innovine, Oct 12, 2018.

  1. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    I am moving my character around using physics calls, and by default this means a rate of 50hz. This causes very noticable jerking movement when viewed in my vive at 90hz.

    To work around this i've set my physics update rate to 0.011111 which is almost 1/90 but not quite. This means there's a frame wrong now and then. Is this possible to avoid? I would like my physics to run at the exact rate as rendering does.
     
  2. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    Best you can do is to disable Physics.autoSimulation, and run it manually in Update(). That way 1 update step is guaranteed to be 1 physics step. It has downsides if your framerate is not rock solid - but for VR I think it's the way to go
     
  3. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Ahh, that sounds like what I want alright, thanks for the heads up. So far I'm holding 90fps so this will be great!
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    30fps (1/30) is a good rate for VR physics.
    90fps (1/90) is a good rate for actual interactions in progress - but don't use physics for this).

    You should consider animated physics for directly interacted objects at frame (90fps) held, or attached to view) and 30fps for the physics that will be simulated in the world.

    If you experience jerking or the temporal artefacts you describe, it is likely you did not turn on interpolation for the rigidbody affected.