Search Unity

Why does my prefab change shape when applied as a child object and how to fix it?

Discussion in 'Prefabs' started by Jeepster, Aug 6, 2019.

  1. Jeepster

    Jeepster

    Joined:
    Jan 23, 2014
    Posts:
    401
    Hi,

    I Imported a 3D object (missile) and attached it to another game object as it's child object, but as soon as I did so, it's scale when nuts and now it looks wrong. If I unparent it and set it's scale back to 1,1,1 it still doesn't fix it. Why does this happen and how can I make sure it remains the way it was imported??

    I really don't see the point or why unity changes the shape and scale of child objects.
     
  2. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    Is one of the parents perhaps scaled and rotated? A model can become deformed if there are different rotations and non-uniform scalings applied, so it's best to keep everything at scale 1, 1, 1. Other than that, is the imported 3D object a SkinnedMeshRenderer? Does it have a rig applied to it with animations?
     
  3. Jeepster

    Jeepster

    Joined:
    Jan 23, 2014
    Posts:
    401
    The parent is slightly scaled but it is not non-uniform scaled. The imported 3D object is imported as an fbx file from Maya. It's just the one object with no bones/rig or painted weights. It has no animation -very clean and simple. Is there no quick way to stop unity from deforming an object when it's applied as a child object to a parent that is scaled? It seems crazy to me :O
     
  4. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    This shouldn't happen when the parent (any parent/ancestor) is not non-uniformly scaled. I can't say why it happens based on the details provided. Showing the complete setup in a video or similar might make things more clear.