diff --git a/SEWorldGenPlugin/GUI/AdminMenu/SubMenus/StarSystemDesigner/MyStarSystemDesignerOrbitMenu.cs b/SEWorldGenPlugin/GUI/AdminMenu/SubMenus/StarSystemDesigner/MyStarSystemDesignerOrbitMenu.cs index ff47192..661aec3 100644 --- a/SEWorldGenPlugin/GUI/AdminMenu/SubMenus/StarSystemDesigner/MyStarSystemDesignerOrbitMenu.cs +++ b/SEWorldGenPlugin/GUI/AdminMenu/SubMenus/StarSystemDesigner/MyStarSystemDesignerOrbitMenu.cs @@ -166,7 +166,7 @@ protected void SetOrbitProperties() } double elevation = MathHelperD.ToDegrees(Math.Asin(parentRel.Z / radius)); - double orbitPos = MathHelperD.ToDegrees(Math.Acos(parentRel.X / Math.Cos(MathHelperD.ToRadians(elevation)) / radius)); + double orbitPos = elevation == 90 ? 0 : MathHelperD.ToDegrees(Math.Acos(parentRel.X / Math.Cos(MathHelperD.ToRadians(elevation)) / radius)); if (parentRel.Y < 0) { orbitPos = 360 - orbitPos;