Search Unity

Changing an object's pivot point in Unity.

Discussion in 'Assets and Asset Store' started by MarkusDavey, Jun 13, 2011.

  1. MarkusDavey

    MarkusDavey

    Joined:
    Jun 3, 2011
    Posts:
    258
    Hello,

    I have imported assets that have their pivot point on the very bottom of the model, and have scripted behaviours that rely in that point being in the 'middle' of the model.

    How can I change the pivot point to the middle?
     
  2. Fidde

    Fidde

    Joined:
    Dec 20, 2010
    Posts:
    109
    Afaik, that isn't possible. You can change the pivot that the editor perceives and uses, but not on the actual model when accessing it through a script. If Transform.RotateAround() isn't enough to get by, you'll have to change the source assets. Seems kind of weird to have an inconsistency between the modeling tool and the game environment, should you find some way to change it.
     
  3. MarkusDavey

    MarkusDavey

    Joined:
    Jun 3, 2011
    Posts:
    258
    well, everything i make in 3ds max has it's pivot in the middle. And in Unity it's always on the bottom :|
     
  4. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    422
  5. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    One workaround that I've used in the past is to parent the object to an empty gameobject positioned where you'd like your pivot point to be.

    It would be great to see support for moving pivots natively though.
     
  6. MarkusDavey

    MarkusDavey

    Joined:
    Jun 3, 2011
    Posts:
    258
  7. Muzzn

    Muzzn

    Joined:
    Jan 23, 2011
    Posts:
    406
    I had a similar problem. Just create an empty GameObject, and make your model/whatever the child of that.