mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
26 lines
775 B
C#
26 lines
775 B
C#
using NewHorizons.Builder.General;
|
|
using NewHorizons.External.Configs;
|
|
using UnityEngine;
|
|
namespace NewHorizons.Components
|
|
{
|
|
public class MapSatelliteOrbitFix : MonoBehaviour
|
|
{
|
|
public void Awake()
|
|
{
|
|
var config = new PlanetConfig
|
|
{
|
|
Base =
|
|
{
|
|
SurfaceSize = 10f
|
|
}
|
|
};
|
|
|
|
var detector = transform.GetComponentInChildren<DynamicForceDetector>();
|
|
var ao = GetComponent<AstroObject>();
|
|
var newDetector = DetectorBuilder.Make(gameObject, ao.GetAttachedOWRigidbody(), ao.GetPrimaryBody(), ao, config);
|
|
newDetector.transform.parent = detector.transform.parent;
|
|
Destroy(detector);
|
|
}
|
|
}
|
|
}
|