dreyzz
dreyzz

Reputation: 99

Unity all objects have same position

I have a 3d building model in my Unity project. It has many children like doors, walls etc. The problem is, all of the children points to same position in the Unity world (24.97, -2.08, 19.35). Their transforms show this position. And this position is far away from their actual one. How can i fix this?

I tried freeing all children from parent but this didn't change anything.

I want them to show their real position, which appears with move tool when we click upon them.

Here is the image link

Upvotes: 0

Views: 1135

Answers (1)

derHugo
derHugo

Reputation: 90659

It seems that this is simply their pivot point exported "wrongly" from the 3D editor your model was made with.

This won't change until you export it correctly from a 3D editor (Blender, Maya, etc).

Unity is not made for 3D mesh modeling and therefore in Unity itself you can't change the pivot points.


There is a very simple fix

  1. Add a new empty GameObject

  2. In the Inspector go to the Transform component, click on the context menu and hit Reset (you also simply set it to position 0,0,0 rotation 0,0,0 and scale 1,1,1) assuming the pivot should be at 0,0,0

  3. Now drag and drop all objects into the empty GameObject

=> You have now one parent object with correct pivot.

By wrapping it in a parent object the childrens pivots don't matter anymore. You can simply do all translation, rotation and scaling on the parent object with the correct pivot and don't have to care about that "wrong" position at all.

Upvotes: 0

Related Questions