Search Unity

Updating Prefab to Change Rotation Point?

Discussion in 'Prefabs' started by chainsawpenguin, Aug 18, 2019.

  1. chainsawpenguin

    chainsawpenguin

    Joined:
    Sep 28, 2014
    Posts:
    107
    I'm just starting to dip my toes into the world of Nested Prefabs, and the first thing I tried led to confusion.

    I have an object that is a floor tile (parent) with a hatch door (child) in the middle of it. In the existing prefab, the hatch is positioned correctly, but it's rotation point is in the center of the hatch.

    "No problem!" I said to myself, "I'll just add a game object that is the child of the floor tile, and then position it where I want the hatch to actually be hinged, and then make the hatch the child of that object."

    So I do that. As soon as I make the hatch the child of my in-between object, however, the rotation point of my hinge object is reset to be the same as the child object. Note that the values in the transform are not altered, but the actual point that the object rotates from is back to the center of the parent tile.

    I even tried switching the order (seeing if maybe the order of inheritance had been reversed or something). This also didn't work: the rotation point of the child just never changes, no matter the order or anything else.

    Any guidance or suggestions would really be appreciated!
     
  2. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    To the right of the tools in the main Unity toolbar, do you see "Center" or "Pivot". Make sure it says Pivot.
     
    ayadkk1988 likes this.