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. Dismiss Notice

Object Jitter

Discussion in 'Editor & General Support' started by CashewTheCat, Aug 12, 2020.

  1. CashewTheCat

    CashewTheCat

    Joined:
    Nov 29, 2017
    Posts:
    17
    I have some objects which are bound to a camera object by some fixed offset. They sit in view of the camera. When I move the camera, they experience heavy jitter. I'm not sure why. Can anyone help?
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,722
    Are you moving the camera or the objects using Rigidbody physics? Are you moving both the camera and the objects in Update() with no guaranteed ordering?
     
  3. CashewTheCat

    CashewTheCat

    Joined:
    Nov 29, 2017
    Posts:
    17
    No rigidbodies at play. Both are being updated each frame, but what are the chances the components execution order is actually changing? They are vanishingly small. Additionally, the jitter translation is rather severe. The distance translated in a single frame is so small, even if it were ping ponging, I bet it would be tough to notice.
     
  4. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,722
    Well there's a few ways to find out.

    Try putting the follow code in LateUpdate, see if that helps any.
     
  5. CashewTheCat

    CashewTheCat

    Joined:
    Nov 29, 2017
    Posts:
    17
    Thanks for the reply and suggestion. Follow code in LateUpdate displays the same behavior.

    I wound up fixing the problem by parenting the followers to the camera, which works fine for my purposes.