Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Camera attachments broken in 5.2.3p3?

Discussion in 'AR/VR (XR) Discussion' started by Poopypoo, Dec 11, 2015.

  1. Poopypoo

    Poopypoo

    Joined:
    Apr 18, 2015
    Posts:
    18
    Hi,

    In Unity 5.2.2p4 I could have an object parented under a camera, and that object would update properly and stay locked to the camera when I moved my head.

    However in Unity 5.2.3p3 the object seems to be a frame behind, and judders when I move my head. Is this a bug, or is there some other recommended way to attach things to the camera so they always appear camera locked (other than using overlays)?

    Thanks!
     
  2. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    Hi,

    I can't seem to reproduce the issue.

    Is there a lot going on in your scene? Or is it just a simple project?

    Are you developing for GearVR? If so which phone?
     
  3. Poopypoo

    Poopypoo

    Joined:
    Apr 18, 2015
    Posts:
    18
    Its not simple... this is for GearVR S6. I'll try and make a sample project and submit a bug. Did you try with the game running at 30hz? It makes it much more apparent.
     
  4. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    If the game isn't hitting 60fps you're going to be dropping frames and thus experience judder. Having an object parented to the camera + the effect of time warp is going to make this judder way more noticeable as frame rate drops. (Even at 60fps having an object attached to the camera may be uncomfortable or slightly 'off')

    If you need this to be rock solid, there is a portion of the Oculus Utilities API that allows you to bypass Time Warp. I'm not an expert on their Utilities package but I think with some digging you will find what you need.
     
  5. Poopypoo

    Poopypoo

    Joined:
    Apr 18, 2015
    Posts:
    18
    I figured out what was wrong.... an object that is attached to a VR camera will not have its transform updated correctly until the VR camera calls its PreCull. It may get updated before that, but I do know at least at that point in time the transform is correct.

    With Unity 5.2.2p4 this was not the case, the transform was updated way earlier. Is this a bug? Or as designed?

    Thanks!