mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix planet orientations
This commit is contained in:
parent
ace3755cc7
commit
70dc69033f
@ -203,6 +203,11 @@ namespace NewHorizons
|
||||
|
||||
if(scene.name == "SolarSystem")
|
||||
{
|
||||
foreach(var body in GameObject.FindObjectsOfType<AstroObject>())
|
||||
{
|
||||
Logger.Log($"{body.name}, {body.transform.rotation}");
|
||||
}
|
||||
|
||||
if(_ship != null)
|
||||
{
|
||||
_ship = GameObject.Find("Ship_Body").InstantiateInactive();
|
||||
@ -212,6 +217,7 @@ namespace NewHorizons
|
||||
IsSystemReady = false;
|
||||
|
||||
HeavenlyBodyBuilder.Reset();
|
||||
CommonResourcesFix.Apply();
|
||||
NewHorizonsData.Load();
|
||||
SignalBuilder.Init();
|
||||
AstroObjectLocator.RefreshList();
|
||||
|
||||
42
NewHorizons/Utility/CommonResources/CommonResourcesFix.cs
Normal file
42
NewHorizons/Utility/CommonResources/CommonResourcesFix.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using PacificEngine.OW_CommonResources.Game.Resource;
|
||||
using PacificEngine.OW_CommonResources.Game.State;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Utility.CommonResources
|
||||
{
|
||||
public static class CommonResourcesFix
|
||||
{
|
||||
public static void Apply()
|
||||
{
|
||||
var mapping = Planet.defaultMapping;
|
||||
|
||||
var DB = mapping[HeavenlyBodies.DarkBramble];
|
||||
mapping[HeavenlyBodies.DarkBramble] = new Planet.Plantoid(
|
||||
DB.size,
|
||||
DB.gravity,
|
||||
DB.state.orbit.orientation.rotation * Quaternion.AngleAxis(180, Vector3.left),
|
||||
DB.state.orbit.orientation.angularVelocity.magnitude,
|
||||
DB.state.parent,
|
||||
DB.state.orbit.coordinates
|
||||
);
|
||||
|
||||
var TT = mapping[HeavenlyBodies.AshTwin];
|
||||
mapping[HeavenlyBodies.AshTwin] = new Planet.Plantoid(
|
||||
TT.size,
|
||||
TT.gravity,
|
||||
TT.state.orbit.orientation.rotation * Quaternion.AngleAxis(180, Vector3.left),
|
||||
TT.state.orbit.orientation.angularVelocity.magnitude,
|
||||
TT.state.parent,
|
||||
TT.state.orbit.coordinates
|
||||
);
|
||||
|
||||
Planet.defaultMapping = mapping;
|
||||
Planet.mapping = mapping;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user