Change default cloud rotation speed

This commit is contained in:
Noah Pilarski 2022-08-14 16:44:30 -04:00
parent 1bcbb1eb66
commit 8c16a50989
2 changed files with 9 additions and 6 deletions

View File

@ -210,11 +210,14 @@ namespace NewHorizons.Builder.Atmosphere
cloudsTopGO.layer = LayerMask.NameToLayer("IgnoreSun"); cloudsTopGO.layer = LayerMask.NameToLayer("IgnoreSun");
} }
RotateTransform topRT = cloudsTopGO.AddComponent<RotateTransform>(); if (atmo.clouds.rotationSpeed != 0f)
// Idk why but the axis is weird {
topRT._localAxis = atmo.clouds.cloudsPrefab == CloudPrefabType.Basic ? Vector3.forward : Vector3.up; RotateTransform topRT = cloudsTopGO.AddComponent<RotateTransform>();
topRT._degreesPerSecond = atmo.clouds.rotationSpeed; // Idk why but the axis is weird
topRT._randomizeRotationRate = false; topRT._localAxis = atmo.clouds.cloudsPrefab == CloudPrefabType.Basic ? Vector3.forward : Vector3.up;
topRT._degreesPerSecond = atmo.clouds.rotationSpeed;
topRT._randomizeRotationRate = false;
}
cloudsTopGO.transform.localPosition = Vector3.zero; cloudsTopGO.transform.localPosition = Vector3.zero;

View File

@ -167,7 +167,7 @@ namespace NewHorizons.External.Modules
/// <summary> /// <summary>
/// How fast the clouds will rotate in degrees per second. /// How fast the clouds will rotate in degrees per second.
/// </summary> /// </summary>
[DefaultValue(10f)] public float rotationSpeed = 10f; [DefaultValue(0f)] public float rotationSpeed = 0f;
#region Obsolete #region Obsolete