Add local position to reference frame

This commit is contained in:
Noah Pilarski 2022-07-21 01:39:31 -04:00
parent 02845778bd
commit 648f9b7068
2 changed files with 12 additions and 0 deletions

View File

@ -41,6 +41,13 @@ namespace NewHorizons.Builder.General
RFV._isPrimaryVolume = true;
RFV._isCloseRangeVolume = false;
if (module.localPosition != null)
{
rfGO.transform.localPosition = module.localPosition;
RV._localPosition = module.localPosition;
RV._useCenterOfMass = false;
}
owrb.SetAttachedReferenceFrameVolume(RFV);
if (!module.enabled) GameObject.Destroy(rfGO);

View File

@ -39,5 +39,10 @@ namespace NewHorizons.External.Modules
/// The radius of the sphere around the planet which you can click on to target it. Defaults to twice the sphere of influence.
/// </summary>
public float targetColliderRadius;
/// <summary>
/// Position that the reference frame relative to the object.
/// </summary>
public MVector3 localPosition;
}
}