Unity Community


Results 1 to 9 of 9

  1. Location
    USA
    Posts
    40

    Change an object's pivot point?

    Hey I can't find this anywhere...Can someone tell me how I might go about changing an objects center point? I imported an object from 3ds max into Unity but Unity reset its center point to the center of the object.

    Thanks!

  2. Volunteer Moderator



    Location
    Copenhagen
    Posts
    5,297
    In the top left there's a pivot button that can be toggled from Center to the Objects pivot point as supplied by the 3d app.

    Reading over this page in the docs could save you some headaches:

    http://unity3d.com/support/documenta...Interface.html


  3. Location
    USA
    Posts
    40
    I tried messing with both those buttons and they didn't do anything...


  4. Location
    USA
    Posts
    40
    Figured it out. You have to convert the object to an editable poly inside of 3ds max before exporting it.


  5. Posts
    3
    I too would like the answer to this, I have created a simple object in my 3d app (Modo) and although the pivot points were set correctly in the app they appear to be quite a way off on the x axis in Unity.

    If I change the pivot point in Unity it does indeed set the pivot point correctly in the view but when I rotate my object using code it is rotating around the offset pivot and not the correct center point.

    Any help offered is greatly appreciated.


  6. Posts
    25

    Similar problem

    Using silo at the moment and I am having a similar problem. I've tried exporting as .3ds and .objs, and whenever I import them into Unity the pivot point on the objects are always way off center.

    Also, pretty sure that the objects pivot point in the 3d Application is centered...But when imported into Unity it becomes messed up.

    Is there anyway to fix this besides using the empty game object trick?

  7. Unity Community Evangelist

    Location
    Copenhagen, Denmark
    Posts
    428
    Just for future reference RE 3d Studio Max and pivot points, you can modify an object's pivot point inside max at any time using the hierarchy tab see attached image:
    Attached Images  
    Joe Robins
    Community Evangelist | Unity Technologies
    www.unity3d.com


  8. Location
    Canada
    Posts
    478
    Sometimes, the easiest solution is just to parent your mesh to an empty GameObject that was placed where you want your pivot point to be, and rotate that instead.


  9. Location
    PDX
    Posts
    1

    Quick easy fix for misplaced pivot points

    There are just going to be times we have a bogus pivot point in a model, and we want it to rotate in a sane manner. It may very well be a bug that unity does not rotate about an objects center, or the bug may be that the pivot point can not be changed once the model is imported. I won't debate that here, but I will provide a fix.

    1)Create a new blank object in your scene, give it a name like "WackoPivotPoint"
    2)Put that object just where you want the pivot point to be, for the errent model
    3) Now make this new blank object a Child of the errent model
    4) whenever you want to rotate the errent model in script, use the "find" function from the errent model's transform. find the child transform by name. In this case
    Code:  
    1. pivot = errentModel.transform.Find("WackoPivotPoint");
    5) Next use the RotateAround function to, well, do just that. in this case
    Code:  
    1. errentModel.transform.RotateAround(pivot.position, Vector3.up,20)

    the following code uses a child transform called "SelectorPivot" to rotate around by 20 degrees


    Code:  
    1.     var pivot : Transform = transform.Find("SelectorPivot");
    2.     this.transform.RotateAround(pivot.position, Vector3.up, -20);


    I hope this helps!

    P.S. don't bug me about the spelling. It's 2:45 am, and I just don't care.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •