new-horizons/NewHorizons/Components/MapSatelliteOrbitFix.cs
Nick J. Connors a158f05a9d Fixes
Fixed comet tail, gravity radius, axial tilt, linear gravity eccentric orbit lines, detail rotation, changed menu screen planets, map satellite orbit,
2022-01-04 15:29:10 -05:00

23 lines
705 B
C#

using NewHorizons.Builder.General;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace NewHorizons.Components
{
public class MapSatelliteOrbitFix : MonoBehaviour
{
public void Awake()
{
var detector = base.transform.GetComponentInChildren<DynamicForceDetector>();
var ao = base.GetComponent<AstroObject>();
var newDetector = DetectorBuilder.Make(base.gameObject, ao.GetAttachedOWRigidbody(), ao.GetPrimaryBody(), ao);
newDetector.transform.parent = detector.transform.parent;
GameObject.Destroy(detector);
}
}
}