This commit is contained in:
Noah Pilarski 2022-08-18 19:36:52 -04:00
parent 9f1345478c
commit 6bd0f0f77f
2 changed files with 6 additions and 6 deletions

View File

@ -130,15 +130,15 @@ namespace NewHorizons.Builder.Body
supernovaEffectController._shockLayerTrailFlare = 100;
supernovaEffectController._shockLayerTrailLength = biggestSize < 600 ? 300 : 600;
var scale = config.ShockEffect != null ? config.ShockEffect.scale : 1.1f;
var radius = config.ShockEffect != null ? config.ShockEffect.radius : 1.1f;
shockLayer.transform.position = planetGO.transform.position;
shockLayer.transform.localScale = Vector3.one * biggestSize * scale;
shockLayer.transform.localScale = Vector3.one * biggestSize * radius;
if (!noMeshChange && procGen != null)
{
shockLayer.GetComponent<MeshFilter>().sharedMesh = procGen.GetComponent<MeshFilter>().sharedMesh;
shockLayer.transform.localScale = Vector3.one * scale;
shockLayer.transform.localScale = Vector3.one * radius;
shockLayer.transform.rotation = Quaternion.Euler(90, 0, 0);
}
@ -150,7 +150,7 @@ namespace NewHorizons.Builder.Body
if (mesh != null)
{
shockLayer.GetComponent<MeshFilter>().sharedMesh = mesh;
shockLayer.transform.localScale = Vector3.one * scale;
shockLayer.transform.localScale = Vector3.one * radius;
shockLayer.transform.rotation = Quaternion.Euler(0, 0, 0);
}
}

View File

@ -17,9 +17,9 @@ namespace NewHorizons.External.Modules
[DefaultValue(true)] public bool hasSupernovaShockEffect = true;
/// <summary>
/// Scale of the shock effect
/// Radius of the shock effect
/// </summary>
[DefaultValue(1.1f)] public float scale = 1.1f;
[DefaultValue(1.1f)] public float radius = 1.1f;
/// <summary>
/// Asset Bundle that contains the shock effect mesh