Hey guys, I’m making a procedural universe type game and I’m having issues with instantiating each planet. When I drag them in (no matter where) to the scene they work fine, but when you instantiate them (again no matter where) they do not. Here’s some pictures to describe what I mean:
When Planet is dragged in :

When Planet is Instantiated in:

Here’s the relevant code :
The World Manager : Link
The Solar System Generator : Link
What do you guys think? I’m kind of confused because when I drag it in, no matter where it works, but instantiating it causes (as you can see) all sorts of weirdness. Thanks in advanced 
I haven’t read through all that code but from the look I’d guess you’re messing up transform.localScale in the Start() method. If you set the local scale of the parent to 10,10,10 and then you set the child’s localPosition to 50,50,50, it will actually be at 500,500,500 in world space because the distance scales up with the parent’s scale.
Maybe first you should create the entire object with all children at the normal 1,1,1 scale, and after you’ve spawned in everything you need, then scale up the parent.
Thanks mate, that as semi-sorted the issue
Basically now I’m facing the issue where all the chunks are far out from the planet. Here’s a picture :
Is this another scaling issue? Thanks again for help with the first bit.
Alright, so I was messing about and now the issue is back. I undid what I had done and that hasn’t solved it
Alright, I fixed it
It was an error in setting the position of the chunks
