Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Problem with pivot point when importing model consisting of more than one object

Discussion in 'General Graphics' started by Tallbird91, Dec 9, 2014.

  1. Tallbird91

    Tallbird91

    Joined:
    Dec 9, 2014
    Posts:
    6
    Hey guys :)

    I'm new to Unity and try to make a Jump'n'Run. Therefore I have multiple objects for decoration, i.e. a tree. At the moment I have only dummy models which I want to replace by the final models later. For this purpose I want to set all pivot points in the middle of the bottom of the models.

    The tree model for example (I made it in 3ds Max and exported it to the .FBX format) consist of two objects (tree trunk and tree crown --> cylinder and sphere) which I grouped to a group named "Tree". For this group I set the pivot point to the middle of the bottom of the cylinder (my model is centered around the origin of the world coordinate system) but when I import it to Unity the pivot point is always in the middle of the whole tree.

    Any ideas what I've done wrong?
     
  2. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,201
    Below the top menu bar are two sets of buttons. The first set includes buttons for selecting move mode, rotation mode, etc.

    Next to that set is another set consisting of two buttons, they should be labeled "Center" and either "Local" or "Global". Click the button labeled "Center" and it will change to "Pivot". That should solve your problem. This controls where the transform gizmo is located on your model(s).
     
    chaosai604, DynamicName and YHX2000 like this.
  3. Tallbird91

    Tallbird91

    Joined:
    Dec 9, 2014
    Posts:
    6
    Thank you for the answer but this is what I've already done because I knew that one have to switch between this two things :) ... last night I solved the problem by deleting the model from the game object and replacing it by the new FBX. But aren't there any ways without wholly replacing the model in the game object in the prefab folder? Reimporting unfortunately doesn't work.

    Maybe I should mention that I have a folder "Meshes" for the models and I create the prefab by creating a empty game object and making the model a child of this game object so I don't have to change the transformations of the model directly.
     
  4. twiesner

    twiesner

    Joined:
    Oct 4, 2011
    Posts:
    309
    Doing what gilley033 suggested should align your prefab's pivot to the bottom of the of the selected object's bounding bounding box.

    Can you post a screengrab of your unity editor?
     
  5. Tallbird91

    Tallbird91

    Joined:
    Dec 9, 2014
    Posts:
    6
    I've already tried this but it didn't help ... I don't know why but it helped to delete the existing prefabs and meshes and then creating new ones. Now the models update as they should :)
     
  6. pointcache

    pointcache

    Joined:
    Sep 22, 2012
    Posts:
    579
    Its because when you group 2 objects and import them unity creates ROOT object for them.
    So eather make one object a child of other(because unity needs ONE object as root, and if there are 2 roots, unity creates new one,), or make in your 3d app another object parent and move it to where your pivot should be.
    But those are crutches i would strongly suggest you start combining your meshes into 1 before exporting to unity, you will save computing power on transformations and drawcalls.
     
  7. Tallbird91

    Tallbird91

    Joined:
    Dec 9, 2014
    Posts:
    6
    Okay, thank you for your advice :)