// Create a planet in orbit around center object with semi-major axis a public static GameObject CreatePlanetInOrbit(GameObject center, float mass, float a) { // position will be trumped by orbit GameObject planet = CreateNBody(mass, new Vector3(1, 0, 0)); OrbitEllipse orbitEllipse = planet.AddComponent <OrbitEllipse>(); orbitEllipse.a = a; orbitEllipse.SetCenterBody(center); return(planet); }