Search Unity

Shaking Character / wavy transforms

Discussion in 'Editor & General Support' started by NathanHale1776, Apr 6, 2015.

  1. NathanHale1776

    NathanHale1776

    Joined:
    Mar 22, 2014
    Posts:
    46
    I'm having a problem with my character's bones shaking like crazy after being parented to his spacecraft and travelling at high speed. Does anyone know how to solve this? You can actually see the transforms and colliders get a "wavy" look to them, and examining everything on the player I can see the bones of the character are moving while everything else is stationary when standing still as it should be. Cannot figure out what is causing it though.

    problem.jpg
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Likely issues with floating point accuracy. Probably best thing to do is to reconsider moving your spacecraft around at hight speed while animating inside the spaceship. I don't know your game, or what you are trying to do, but you might consider having multiple cameras - one for "inside" the ship when you're in first person view, and one for the space scene and outside view. Then just move the "outside camera" around and draw the inside (which would be static) after drawing the outside camera and then clearing the zbuffer.
    Of course, this may not make sense, since I don't know your gameplay.
     
  3. NathanHale1776

    NathanHale1776

    Joined:
    Mar 22, 2014
    Posts:
    46
    Thanks Jaimi, what I am going for here is third person character which will sit in pilot chair of ship and fly in space. On keypress parent and unparent from pilot seat (has a sit animation). I wanted to stray away from having scenes for everything, such as an inside scene and outside scene. I have a ship that has inside as well as outside. Not sure why parenting in this type of case is causing this issue. Surely there is some solution to fix this rather than going around the issue altogether. If not, I consider this a bug that needs to be fixed?
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Only so much you can do with floating point though, especially if you're moving at a very fast speed, or the numbers get very high - the way it's stored just makes it be inconsistent except at smaller values.

    But what i was referring to above didn't need two scenes - just one scene with two cameras. One camera would draw space (it would be the thing you would actually move around) and the other would draw your interior (which would be static and on a different layer). This of course introduces it's own issues that you need to work around, but overall, I think likely the simplest solution.