mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
20 lines
806 B
C#
20 lines
806 B
C#
using UnityEngine;
|
|
using Logger = NewHorizons.Utility.Logger;
|
|
|
|
namespace NewHorizons.Builder.Body
|
|
{
|
|
public static class GeometryBuilder
|
|
{
|
|
public static void Make(GameObject body, Sector sector, float groundScale)
|
|
{
|
|
GameObject groundGO = GameObject.CreatePrimitive(PrimitiveType.Sphere);
|
|
groundGO.transform.parent = sector?.transform ?? body.transform;
|
|
groundGO.transform.localScale = new Vector3(groundScale, groundScale, groundScale);
|
|
groundGO.transform.localPosition = Vector3.zero;
|
|
groundGO.GetComponent<MeshFilter>().mesh = GameObject.Find("CloudsTopLayer_GD").GetComponent<MeshFilter>().mesh;
|
|
groundGO.GetComponent<SphereCollider>().radius = 1f;
|
|
groundGO.SetActive(true);
|
|
}
|
|
}
|
|
}
|