my project has a groundplane which symbolised the floor of my room. I have an empty gameobject called "ground-grid", created within a script. The script creates many sub-grids (smaller size) and adds every single grid to my "ground-grid".
"Randomly" my script creates 2x2-Grids (to use for such sized objects later). If such a grid appears, the script creates another empty gameobject called the number of currently existing 2x2-grids.
Here's an example of the hierarchy:
For the sake of convenience i just want to place a 2x2-Obj on parent. For example on "1".
The problem is, that the empty go "1" is positioned in the middle of the for sub-grids, but has the transform.position coords of (0,0,0). If i want to position my object on the same coords it appears in the center of the world (because thats 0,0,0). Can you tell me, how to let the parent go have the right coords?
asked Apr 03 '10 at 02:48 PM
I solved the problem by attaching a MeshRenderer component to each object. Than the positionig was correct.
answered Apr 20 '10 at 01:36 PM