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

Weird object behaviour when moving camera

Discussion in 'Editor & General Support' started by DELTA12, Jun 1, 2015.

  1. DELTA12

    DELTA12

    Joined:
    Nov 23, 2013
    Posts:
    6
    Everything works fine in the game i'm developing, except in one scene. Whenever i rotate / move the camera all objects in the scene seem to start wobbling and flickering. It happens only on 1 scene in the whole game, although it's not different in any way.
    Here's a video of what's happening:
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Strange... are you sure you're not moving any light sources? Maybe your buffers don't have enough accuracy... you could try changing the near and far clipping panes on your camera. I recommend having your near clip at 0.5 and your far clip as small as you can while still keeping it big enough for your scene.

    If the problem continues, it could be something with your lightmaps. Best of luck!
     
  3. DELTA12

    DELTA12

    Joined:
    Nov 23, 2013
    Posts:
    6
    Yes, the object flashing can be fixed by changing the clip planes, although the textures still tend to flicker because it seems that the objects are moving during the movement, so they tend to mysteriously overlap. Unfortunately, that's not what concerns me most. It is that objects attached to the camera seem to "wobble" or just move in a weird way when the camera rotates. (can be seen on the boxy object in the center of the screen). I am sure i don't have any scripts interacting with the camera or the attached object.
     
  4. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Hmm... that's strange. If you're moving those "wobbly" objects in an Update function, you might try changing that to FixedUpdate. (FixedUpdate runs JUST before rendering, so it'll position things correctly before they're drawn). Besides that, I'm not sure what else you can do.
     
  5. DELTA12

    DELTA12

    Joined:
    Nov 23, 2013
    Posts:
    6
    As i said i'm not using any scripts interacting with the object movement. It's clearly child-parent movement.
     
  6. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    That's crazy... The only time I've seen anything like that happen when all objects are supposed to move together is when you have multithreading and sometimes the render happens before the update and sometimes after, but Unity shouldn't allow that to happen at all. I'm sorry, I don't know what else could be happening =/
     
  7. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Your objects are too far away. Your camera is at -11000, you probably have floating point errors.