If you have a question regarding the programming part, or anything really, i\'m sure there is someone out there that can help you. You don\'t have to make a new thread for a simple question, just post it here
After trying some stuff and looking at the source code of mods (especially this one : https://github.com/JPLRepo/TarsierSpaceTechnology ) I managed to get it somewhat working. It seems to work if you set the parent of the GameObject to one of the (scaled version) bodies GameObjects.
obj = GameObject.CreatePrimitive(PrimitiveType.Sphere);
obj.layer = 10;
float scale = 2f*(float)bodiesByName["Kerbin"].Radius / ScaledSpace.ScaleFactor;
obj.transform.localScale = scale * Vector3.one;
obj.transfor