- Home /
Question by
invalidUsername404 · Mar 25 at 03:57 AM ·
instantiateprefabvector3positioningoffset
Stop Children of Instantiated Parent From Offsetting After Changing Position
I instantiated a prefab with 3 children and the distances between the children are correct when I first set it at given coordinates. I also dragged the cloned prefab around in the scene and every child was the same distance apart. However, when I attempt to change the position of the parent object (cloned prefab)
buildingparent.transform.position = new Vector3(xpos, buildingpos.y, zpos);
only the first 2 children are the correct distance apart while the last child is offset by a significant amount. I've also tried doing transform.localPosition but it didn't make any impact with the result either. How do I keep the distances between children in a cloned prefab the same and stop them from offsetting after changing positions?
Comment