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");
}
RotateTransform topRT = cloudsTopGO.AddComponent<RotateTransform>();
// Idk why but the axis is weird
topRT._localAxis = atmo.clouds.cloudsPrefab == CloudPrefabType.Basic ? Vector3.forward : Vector3.up;
topRT._degreesPerSecond = atmo.clouds.rotationSpeed;
topRT._randomizeRotationRate = false;
if (atmo.clouds.rotationSpeed != 0f)
{
RotateTransform topRT = cloudsTopGO.AddComponent<RotateTransform>();
// Idk why but the axis is weird
topRT._localAxis = atmo.clouds.cloudsPrefab == CloudPrefabType.Basic ? Vector3.forward : Vector3.up;
topRT._degreesPerSecond = atmo.clouds.rotationSpeed;
topRT._randomizeRotationRate = false;
}
cloudsTopGO.transform.localPosition = Vector3.zero;

View File

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