From e67c93122bcb589c1904f4f350ff13e4c0fd47aa Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 18 Apr 2022 03:00:11 -0400 Subject: [PATCH] Fix gravity not being set up before Start --- NewHorizons/Components/Orbital/Gravity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Components/Orbital/Gravity.cs b/NewHorizons/Components/Orbital/Gravity.cs index 8878608f..2f733cd0 100644 --- a/NewHorizons/Components/Orbital/Gravity.cs +++ b/NewHorizons/Components/Orbital/Gravity.cs @@ -38,8 +38,8 @@ namespace NewHorizons.Components.Orbital } else { - Mass = gv._gravitationalMass; Power = gv._falloffType == GravityVolume.FalloffType.linear ? 1 : 2; + Mass = gv._surfaceAcceleration * Mathf.Pow(gv._upperSurfaceRadius, Power) / GravityVolume.GRAVITATIONAL_CONSTANT; } } }