Hi Guys,
I am loading models at runtime that are in the wrong coordinate system (Z-up.) I really dont want to do my whole app in this coordinate system. A negative 90 degree rotation around X fixes the problem, but then its positional coordinates are in its local z-upcoordinate system. ![]()
What I wanted to do was to attach the model to a parent node that is still in the apps coordinate system The following code however is not working. The parent transform seems to have no effect whatsoever.
What am I doing wrong?
tile = new GameObject();
// need to rotate coordinate system
tile.transform.localPosition = new Vector3(loc.x*10,0,loc.y*10);
GameObject tileGeometry = (GameObject)Instantiate(prefab,
new Vector3(0,0,0),Quaternion.Euler(-90,0,0));
tileGeometry.transform.parent=tile.transform;