diff --git a/NewHorizons/External/Configs/PlanetConfig.cs b/NewHorizons/External/Configs/PlanetConfig.cs
index 81dd162a..ea9a7a39 100644
--- a/NewHorizons/External/Configs/PlanetConfig.cs
+++ b/NewHorizons/External/Configs/PlanetConfig.cs
@@ -52,6 +52,11 @@ namespace NewHorizons.External.Configs
///
public bool destroy;
+ ///
+ /// `true` if you want the map zoom speed to adjust to this planet's orbit
+ ///
+ public bool adjustZoomSpeed = true;
+
///
/// A list of paths to child GameObjects to destroy on this planet
///
diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs
index 60d3bded..3e4efbad 100644
--- a/NewHorizons/Handlers/PlanetCreationHandler.cs
+++ b/NewHorizons/Handlers/PlanetCreationHandler.cs
@@ -413,7 +413,7 @@ namespace NewHorizons.Handlers
AstroObjectLocator.RegisterCustomAstroObject(ao);
// Now that we're done move the planet into place
- SetPositionFromVector(go, body.Config.Orbit.staticPosition);
+ SetPositionFromVector(go, body.Config.Orbit.staticPosition, body.Config.adjustZoomSpeed);
NHLogger.LogVerbose($"Finished creating Bramble Dimension [{body.Config.name}]");
@@ -500,7 +500,7 @@ namespace NewHorizons.Handlers
// Now that we're done move the planet into place
if (body.Config.Orbit?.staticPosition != null)
{
- SetPositionFromVector(go, body.Config.Orbit.staticPosition);
+ SetPositionFromVector(go, body.Config.Orbit.staticPosition, body.Config.adjustZoomSpeed);
}
else
{
@@ -920,15 +920,15 @@ namespace NewHorizons.Handlers
var secondaryGravity = new Gravity(secondaryBody.GetGravityVolume());
var pos = orbit.GetOrbitalParameters(primaryGravity, secondaryGravity).InitialPosition + primaryBody.transform.position;
- SetPositionFromVector(go, pos);
+ SetPositionFromVector(go, pos, true);
}
else
{
- SetPositionFromVector(go, Vector3.zero);
+ SetPositionFromVector(go, Vector3.zero, true);
}
}
- public static void SetPositionFromVector(GameObject go, Vector3 position)
+ public static void SetPositionFromVector(GameObject go, Vector3 position, bool adjustZoomSpeed)
{
var rb = go.GetAttachedOWRigidbody();
if (rb)
@@ -960,7 +960,7 @@ namespace NewHorizons.Handlers
// Uses the ratio of the interlopers furthest point to what the base game considers the edge of the solar system
var distanceToCenter = go.transform.position.magnitude / (24000 / 30000f);
- if (distanceToCenter > SolarSystemRadius)
+ if (distanceToCenter > SolarSystemRadius && adjustZoomSpeed)
{
SolarSystemRadius = distanceToCenter;
}
diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json
index 6b011cc4..a652accb 100644
--- a/NewHorizons/Schemas/body_schema.json
+++ b/NewHorizons/Schemas/body_schema.json
@@ -31,6 +31,11 @@
"type": "boolean",
"description": "`true` if you want to delete this planet"
},
+ "adjustZoomSpeed": {
+ "type": "boolean",
+ "description": "`true` if you want the map zoom speed to adjust to fit this planet's orbit",
+ "default": true
+ },
"removeChildren": {
"type": "array",
"description": "A list of paths to child GameObjects to destroy on this planet",