Bigger Sectors & Various Bugfixes

Minimap works again
Stardust density is now proportional to gravity depth
Generated zones are double the size and better distributed
Orbital hierarchy actually working now (!)
Station start position actually orbits something now
Max gravity strength remapped to infinity (zone boundary is properly impassable now)
This commit is contained in:
Reinier Vens 2020-12-23 22:38:30 +00:00
commit 9e88fcda95
21 changed files with 245 additions and 214 deletions

View file

@ -376,7 +376,12 @@ public class SectorRenderer : MonoBehaviour
ship.Value.Transform.position = new Vector3(ship.Key.Position.x,h + hullData.GridOffset,ship.Key.Position.y);
var normal = _zone.GetNormal(ship.Key.Position);
var f = new float2(normal.x, normal.z);
ship.Key.Velocity += f * Settings.PlanetSettings.GravityStrength;// * lengthsq(f);
var fl = lengthsq(f);
if(fl > .001)
{
var fa = 1 / (1 - fl) - 1;
ship.Key.Velocity += normalize(f) * Settings.PlanetSettings.GravityStrength * fa;
}
//Debug.Log($"Normal: {normal}");
var shipRight = ship.Key.Direction.Rotate(ItemRotation.Clockwise);
var forward = Vector3.Cross(new Vector3(shipRight.x,0,shipRight.y), normal);