Skip to content

Commit

Permalink
stopped orbit line from generating at the eye (#1035)
Browse files Browse the repository at this point in the history
the eye of the universe does not have a map viewer instance in its
scene, so why even generate orbit lines to begin with? this also solved
a graphical glitch containing a missing texture seen in new horizons
examples.
  • Loading branch information
MegaPiggy authored Feb 7, 2025
2 parents e5dae9e + 95ff46c commit 5c9dd07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 8 additions & 2 deletions NewHorizons/Handlers/PlanetCreationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,10 @@ public static GameObject GenerateStandardBody(NewHorizonsBody body, bool default

if (body.Config.Orbit.showOrbitLine && !body.Config.Orbit.isStatic)
{
OrbitlineBuilder.Make(body.Object, body.Config.Orbit.isMoon, body.Config);
if (LoadManager.GetCurrentScene() != OWScene.EyeOfTheUniverse)
{
OrbitlineBuilder.Make(body.Object, body.Config.Orbit.isMoon, body.Config);
}
}

DetectorBuilder.Make(go, owRigidBody, primaryBody, ao, body.Config);
Expand Down Expand Up @@ -843,7 +846,10 @@ public static void UpdateBodyOrbit(NewHorizonsBody body, GameObject go)
var isMoon = newAO.GetAstroObjectType() is AstroObject.Type.Moon or AstroObject.Type.Satellite or AstroObject.Type.SpaceStation;
if (body.Config.Orbit.showOrbitLine)
{
OrbitlineBuilder.Make(go, isMoon, body.Config);
if (LoadManager.GetCurrentScene() != OWScene.EyeOfTheUniverse)
{
OrbitlineBuilder.Make(go, isMoon, body.Config);
}
}

DetectorBuilder.SetDetector(primary, newAO, go.GetComponentInChildren<ConstantForceDetector>());
Expand Down
3 changes: 3 additions & 0 deletions docs/src/content/docs/guides/planet-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ This makes the second planet a quantum state of the first, anything you specify
}
```

Keep in mind that if you redefine `Orbit` on all configs (even with the same parameters each time), **the planet will change its position within its orbit when changing states.**
*If you want your Quantum Planet's position to* ***NOT*** *change,* ***only define `Orbit` on the main state***.

## Barycenters (Focal Points)

To create a binary system of planets (like ash twin and ember twin), first create a config with `FocalPoint` set
Expand Down

0 comments on commit 5c9dd07

Please sign in to comment.