Geyser offset

This commit is contained in:
TerrificTrifid 2022-07-27 23:48:12 -05:00
parent f5b2b17405
commit 3479dff5e6
2 changed files with 8 additions and 3 deletions

View File

@ -13,10 +13,10 @@ namespace NewHorizons.Builder.Props
var pos = (Vector3)info.position;
// Want half of it to be underground
var length = pos.magnitude - 65;
// Offset height, default -97.5 pushes it underground so the spout is at the surface
var length = pos.magnitude + info.offset;
// About 130 high and the surface is at 65
// About 130 high, bubbles start at 10, shaft starts at 67, spout starts at 97.5
geyserGO.transform.position = planetGO.transform.TransformPoint(pos.normalized * length);
geyserGO.transform.localScale = Vector3.one;

View File

@ -219,6 +219,11 @@ namespace NewHorizons.External.Modules
/// </summary>
public MVector3 position;
/// <summary>
/// Vertical offset of the geyser. From 0, the bubbles start at a height of 10, the shaft at 67, and the spout at 97.5.
/// </summary>
[DefaultValue(-97.5f)] public float offset = -97.5f;
/// <summary>
/// Disable the individual particle systems of the geyser
/// </summary>