mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Create reference frame but disable if not wanted
This commit is contained in:
parent
76e4ed12d5
commit
b8b3d70638
@ -4,7 +4,7 @@ namespace NewHorizons.Builder.General
|
||||
{
|
||||
public static class RFVolumeBuilder
|
||||
{
|
||||
public static void Make(GameObject planetGO, OWRigidbody owrb, float sphereOfInfluence)
|
||||
public static void Make(GameObject planetGO, OWRigidbody owrb, float sphereOfInfluence, bool hide = false)
|
||||
{
|
||||
var rfGO = new GameObject("RFVolume");
|
||||
rfGO.transform.parent = planetGO.transform;
|
||||
@ -38,7 +38,7 @@ namespace NewHorizons.Builder.General
|
||||
|
||||
owrb.SetAttachedReferenceFrameVolume(RFV);
|
||||
|
||||
rfGO.SetActive(true);
|
||||
rfGO.SetActive(!hide);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,10 +306,7 @@ namespace NewHorizons.Handlers
|
||||
GravityBuilder.Make(go, ao, owRigidBody, body.Config);
|
||||
}
|
||||
|
||||
if (body.Config.Base.hasReferenceFrame)
|
||||
{
|
||||
RFVolumeBuilder.Make(go, owRigidBody, sphereOfInfluence);
|
||||
}
|
||||
RFVolumeBuilder.Make(go, owRigidBody, sphereOfInfluence, !body.Config.Base.hasReferenceFrame);
|
||||
|
||||
if (body.Config.Base.hasMapMarker)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user