Simple scenario. My script creates 2 gameobjects (named "root" and "child"). The "child" game object has a procedural mesh attached to it. Let's pretend here I am creating a cube manually that has a width/height/depth of 100.0 units and is centered in local space around (0,0,0).
rootGameObject.transform.parent = null; child.transform.position = Vector3.zero; child.transform.localPosition = Vector3.zero;
child.transform.parent = rootGameObject.transform; child.transform.localPosition = new Vector3(0,0,50.0f);
What should happen in the above example is that "root" gameobject should be coplanar to the front face of the cube. Number-wise, it is. However, the axis gizmo that shows up in the editor does not show this. It visually depicts "root" transform position to be in the center of the cube. The "child" transforms position is correct. It is also at the center.
Any ideas? Is this a bug? I'm using Unity 3.0.0f5 version if that helps.
asked Jan 25 '11 at 05:46 PM