- Home /
World coordinate changes when update prefab
Background: I created a hallway segment prefab. Later I had to change the height of the hallway, I altered one of the prefabs placed in the world, and dragged it over the original prefab to overwrite. Sometimes it works fine and my map is updated correctly. Other times, the hallway pieces get thrown off world coordinates, clumped together based on their hallway segment. I thought it might be caused by the prefabs being placed within an empty game object (I made a left hallway, center hallway and right hallway objects for organization purposes). But the last update these segments weren't combined in this way.
Thank you for your insights.
When you overwrite, you must mean you add it as a child. When you do so, the child object is not using the world's origin coordinates, it is actually using the parent coordinates as origin. So if, the parent is at (10,20,30) then this particular coordinates is (0,0,0) for the child. Then, if you move the parent, it is like moving the world of the child so it follows. Is that what you meant?
Your answer
![](https://koobas.hobune.stream/wayback/20220613065410im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Understanding Unity's coordinate system 3 Answers
Help aligning instantiated prefab in the world view 1 Answer
how can i get the position of the objects in a instantiated prefab? 0 Answers
My objects instantiate at a strange z coordinate 0 Answers
How can I get the length, width and corner coordinates of a prefab? 1 Answer