Gravity: one potential per zone owns acceleration and height
GravityField is the law of one well (logarithmic tail, softened core). Zone.GetForce and GetHeight sum it over the bodies; GetNormal derives from the force for ship tilt; Flow and Ship read GetForce. Well strength, core radius and Roche limit are PlanetSettings curves of mass, height exaggeration K one global. Deletes GravityAcceleration, GravityReferenceRate, GravityStrength, the PowerPulse well, GetNormal's finite differences and BodyData.GravityDepthExponent. Settings.asset carries the calibrated curves. Tests: PotentialOwnerTests, the moon's moon placement, retired keys over every BodyData type, a body-derived giant sweep. Not yet built or run (verify job follows); this commit may not build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ff63362f45
commit
021c4cbcbf
16 changed files with 433 additions and 171 deletions
|
|
@ -17,11 +17,21 @@ public class PlanetSettings
|
|||
public ExponentialCurve GravityRadius;
|
||||
public ExponentialCurve LightRadius;
|
||||
public ExponentialCurve BodyRadius;
|
||||
|
||||
// The closest a child may orbit its parent, in u, by the parent's mass. Authored like BodyRadius, never per body.
|
||||
public ExponentialCurve RocheLimit = new ExponentialCurve();
|
||||
|
||||
// A body's well, by its mass (GravityField): its strength c in u^2/s^2 (the pull is c / r beyond the core) and its
|
||||
// softened core radius in u, which must stay inside the RocheLimit curve.
|
||||
public ExponentialCurve WellStrength = new ExponentialCurve();
|
||||
public ExponentialCurve CoreRadius = new ExponentialCurve();
|
||||
|
||||
// The one global exaggeration of gravity height: height = potential / K, in u/s^2 per unit of height.
|
||||
public float HeightExaggeration = 1f;
|
||||
public float AsteroidVerticalOffset = -5f;
|
||||
public ExponentialLerp AsteroidSize;
|
||||
public ExponentialLerp AsteroidHitpoints;
|
||||
public ExponentialLerp AsteroidRespawnTime;
|
||||
public float GravityStrength;
|
||||
public float SecureAreaRadiusMultiplier = .45f;
|
||||
|
||||
public ExponentialCurve OrbitPeriod;
|
||||
|
|
|
|||
Loading…
Reference in a new issue